Skip to content

Commit 35817de

Browse files
[skip ci] Archive 4de7165 (#28249)
1 parent 5e595c1 commit 35817de

File tree

78 files changed

+6026
-676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+6026
-676
lines changed

generated/EventHub/EventHub.Autorest/Az.EventHub.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.EventHub.private.dll'
1313
FormatsToProcess = './Az.EventHub.format.ps1xml'
14-
FunctionsToExport = 'Approve-AzEventHubPrivateEndpointConnection', 'Deny-AzEventHubPrivateEndpointConnection', 'Get-AzEventHub', 'Get-AzEventHubApplicationGroup', 'Get-AzEventHubAuthorizationRule', 'Get-AzEventHubCluster', 'Get-AzEventHubClusterNamespace', 'Get-AzEventHubClustersAvailableRegion', 'Get-AzEventHubConsumerGroup', 'Get-AzEventHubGeoDRConfiguration', 'Get-AzEventHubKey', 'Get-AzEventHubNamespace', 'Get-AzEventHubNetworkRuleSet', 'Get-AzEventHubPrivateEndpointConnection', 'Get-AzEventHubPrivateLink', 'Get-AzEventHubSchemaGroup', 'New-AzEventHub', 'New-AzEventHubApplicationGroup', 'New-AzEventHubAuthorizationRule', 'New-AzEventHubCluster', 'New-AzEventHubConsumerGroup', 'New-AzEventHubGeoDRConfiguration', 'New-AzEventHubIPRuleConfig', 'New-AzEventHubKey', 'New-AzEventHubKeyVaultPropertiesObject', 'New-AzEventHubLocationsNameObject', 'New-AzEventHubNamespace', 'New-AzEventHubSchemaGroup', 'New-AzEventHubThrottlingPolicyConfig', 'New-AzEventHubVirtualNetworkRuleConfig', 'Remove-AzEventHub', 'Remove-AzEventHubApplicationGroup', 'Remove-AzEventHubAuthorizationRule', 'Remove-AzEventHubCluster', 'Remove-AzEventHubConsumerGroup', 'Remove-AzEventHubGeoDRConfiguration', 'Remove-AzEventHubNamespace', 'Remove-AzEventHubPrivateEndpointConnection', 'Remove-AzEventHubSchemaGroup', 'Set-AzEventHub', 'Set-AzEventHubApplicationGroup', 'Set-AzEventHubAuthorizationRule', 'Set-AzEventHubCluster', 'Set-AzEventHubConsumerGroup', 'Set-AzEventHubGeoDRConfigurationBreakPair', 'Set-AzEventHubGeoDRConfigurationFailOver', 'Set-AzEventHubNamespace', 'Set-AzEventHubNetworkRuleSet', 'Start-AzEventHubNamespaceFailOver', 'Test-AzEventHubName'
14+
FunctionsToExport = 'Approve-AzEventHubPrivateEndpointConnection', 'Deny-AzEventHubPrivateEndpointConnection', 'Get-AzEventHub', 'Get-AzEventHubApplicationGroup', 'Get-AzEventHubAuthorizationRule', 'Get-AzEventHubCluster', 'Get-AzEventHubClusterNamespace', 'Get-AzEventHubClustersAvailableRegion', 'Get-AzEventHubConsumerGroup', 'Get-AzEventHubGeoDRConfiguration', 'Get-AzEventHubKey', 'Get-AzEventHubNamespace', 'Get-AzEventHubNetworkRuleSet', 'Get-AzEventHubNetworkSecurityPerimeterConfiguration', 'Get-AzEventHubNetworkSecurityPerimeterConfigurationsForAssociation', 'Get-AzEventHubPrivateEndpointConnection', 'Get-AzEventHubPrivateLink', 'Get-AzEventHubSchemaGroup', 'New-AzEventHub', 'New-AzEventHubApplicationGroup', 'New-AzEventHubAuthorizationRule', 'New-AzEventHubCluster', 'New-AzEventHubConsumerGroup', 'New-AzEventHubGeoDRConfiguration', 'New-AzEventHubIPRuleConfig', 'New-AzEventHubKey', 'New-AzEventHubKeyVaultPropertiesObject', 'New-AzEventHubLocationsNameObject', 'New-AzEventHubNamespace', 'New-AzEventHubSchemaGroup', 'New-AzEventHubThrottlingPolicyConfig', 'New-AzEventHubVirtualNetworkRuleConfig', 'Remove-AzEventHub', 'Remove-AzEventHubApplicationGroup', 'Remove-AzEventHubAuthorizationRule', 'Remove-AzEventHubCluster', 'Remove-AzEventHubConsumerGroup', 'Remove-AzEventHubGeoDRConfiguration', 'Remove-AzEventHubNamespace', 'Remove-AzEventHubPrivateEndpointConnection', 'Remove-AzEventHubSchemaGroup', 'Set-AzEventHub', 'Set-AzEventHubApplicationGroup', 'Set-AzEventHubAuthorizationRule', 'Set-AzEventHubCluster', 'Set-AzEventHubConsumerGroup', 'Set-AzEventHubGeoDRConfigurationBreakPair', 'Set-AzEventHubGeoDRConfigurationFailOver', 'Set-AzEventHubNamespace', 'Set-AzEventHubNetworkRuleSet', 'Start-AzEventHubNamespaceFailOver', 'Test-AzEventHubName'
1515
AliasesToExport = 'Get-AzEventHubNamespaceV2', 'New-AzEventHubNamespaceV2', 'Remove-AzEventHubNamespaceV2', 'Set-AzEventHubNamespaceV2'
1616
PrivateData = @{
1717
PSData = @{

generated/EventHub/EventHub.Autorest/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")]
2424
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26-
[assembly: System.CLSCompliantAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
14+
# is regenerated.
15+
# ----------------------------------------------------------------------------------
16+
17+
<#
18+
.Synopsis
19+
Gets list of current NetworkSecurityPerimeterConfiguration for Namespace
20+
.Description
21+
Gets list of current NetworkSecurityPerimeterConfiguration for Namespace
22+
.Example
23+
Get-AzEventHubNetworkSecurityPerimeterConfiguration -ResourceGroupName myResourceGroup -NamespaceName myNamespace
24+
25+
.Outputs
26+
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList
27+
.Link
28+
https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnetworksecurityperimeterconfiguration
29+
#>
30+
function Get-AzEventHubNetworkSecurityPerimeterConfiguration {
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList])]
32+
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
33+
param(
34+
[Parameter(Mandatory)]
35+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')]
36+
[System.String]
37+
# The Namespace name
38+
${NamespaceName},
39+
40+
[Parameter(Mandatory)]
41+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')]
42+
[System.String]
43+
# Name of the resource group within the azure subscription.
44+
${ResourceGroupName},
45+
46+
[Parameter()]
47+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')]
48+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
49+
[System.String[]]
50+
# Subscription credentials that uniquely identify a Microsoft Azure subscription.
51+
# The subscription ID forms part of the URI for every service call.
52+
${SubscriptionId},
53+
54+
[Parameter()]
55+
[Alias('AzureRMContext', 'AzureCredential')]
56+
[ValidateNotNull()]
57+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Azure')]
58+
[System.Management.Automation.PSObject]
59+
# The DefaultProfile parameter is not functional.
60+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
61+
${DefaultProfile},
62+
63+
[Parameter(DontShow)]
64+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')]
65+
[System.Management.Automation.SwitchParameter]
66+
# Wait for .NET debugger to attach
67+
${Break},
68+
69+
[Parameter(DontShow)]
70+
[ValidateNotNull()]
71+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')]
72+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[]]
73+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
74+
${HttpPipelineAppend},
75+
76+
[Parameter(DontShow)]
77+
[ValidateNotNull()]
78+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')]
79+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[]]
80+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
81+
${HttpPipelinePrepend},
82+
83+
[Parameter(DontShow)]
84+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')]
85+
[System.Uri]
86+
# The URI for the proxy server to use
87+
${Proxy},
88+
89+
[Parameter(DontShow)]
90+
[ValidateNotNull()]
91+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')]
92+
[System.Management.Automation.PSCredential]
93+
# Credentials for a proxy server to use for the remote call
94+
${ProxyCredential},
95+
96+
[Parameter(DontShow)]
97+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Runtime')]
98+
[System.Management.Automation.SwitchParameter]
99+
# Use the default credentials for the proxy
100+
${ProxyUseDefaultCredentials}
101+
)
102+
103+
begin {
104+
try {
105+
$outBuffer = $null
106+
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
107+
$PSBoundParameters['OutBuffer'] = 1
108+
}
109+
$parameterSet = $PSCmdlet.ParameterSetName
110+
111+
$testPlayback = $false
112+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
113+
114+
$context = Get-AzContext
115+
if (-not $context -and -not $testPlayback) {
116+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
117+
exit
118+
}
119+
120+
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
121+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
122+
}
123+
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
124+
if ($preTelemetryId -eq '') {
125+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
126+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
127+
} else {
128+
$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
129+
if ($internalCalledCmdlets -eq '') {
130+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
131+
} else {
132+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
133+
}
134+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
135+
}
136+
137+
$mapping = @{
138+
List = 'Az.EventHub.private\Get-AzEventHubNetworkSecurityPerimeterConfiguration_List';
139+
}
140+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
141+
if ($testPlayback) {
142+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
143+
} else {
144+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
145+
}
146+
}
147+
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
148+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
149+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
150+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
151+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
152+
}
153+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
154+
if ($wrappedCmd -eq $null) {
155+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
156+
}
157+
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
158+
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
159+
$steppablePipeline.Begin($PSCmdlet)
160+
} catch {
161+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
162+
throw
163+
}
164+
}
165+
166+
process {
167+
try {
168+
$steppablePipeline.Process($_)
169+
} catch {
170+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
171+
throw
172+
}
173+
174+
finally {
175+
$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
176+
$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
177+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
178+
}
179+
180+
}
181+
end {
182+
try {
183+
$steppablePipeline.End()
184+
185+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
186+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
187+
if ($preTelemetryId -eq '') {
188+
[Microsoft.Azure.PowerShell.Cmdlets.EventHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
189+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
190+
}
191+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
192+
193+
} catch {
194+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
195+
throw
196+
}
197+
}
198+
}

0 commit comments

Comments
 (0)