Skip to content

Commit 17a89e7

Browse files
[skip ci] Archive a52b6e6 (Azure#27387)
1 parent a52b6e6 commit 17a89e7

File tree

118 files changed

+2121
-11068
lines changed

Some content is hidden

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

118 files changed

+2121
-11068
lines changed

generated/Monitor/PipelineGroup.Autorest/Az.PipelineGroup.format.ps1xml

+81-319
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - PipelineGroup")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("6.0.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("6.0.1")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
27+

generated/Monitor/PipelineGroup.Autorest/exports/Get-AzPipelineGroup.ps1

+12-2
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ begin {
132132
$PSBoundParameters['OutBuffer'] = 1
133133
}
134134
$parameterSet = $PSCmdlet.ParameterSetName
135+
136+
$testPlayback = $false
137+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.PipelineGroup.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
138+
139+
$context = Get-AzContext
140+
if (-not $context -and -not $testPlayback) {
141+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
142+
exit
143+
}
135144

136145
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
137146
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -157,8 +166,6 @@ begin {
157166
List1 = 'Az.PipelineGroup.private\Get-AzPipelineGroup_List1';
158167
}
159168
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
160-
$testPlayback = $false
161-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.PipelineGroup.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
162169
if ($testPlayback) {
163170
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
164171
} else {
@@ -172,6 +179,9 @@ begin {
172179
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
173180
}
174181
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
182+
if ($wrappedCmd -eq $null) {
183+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
184+
}
175185
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
176186
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
177187
$steppablePipeline.Begin($PSCmdlet)

generated/Monitor/PipelineGroup.Autorest/exports/New-AzPipelineGroup.ps1

+16-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ PROCESSOR <IProcessor[]>: The processors specified for a pipeline group instance
6868
RECEIVER <IReceiver[]>: The receivers specified for a pipeline group instance.
6969
Name <String>: The name of receiver.
7070
Type <String>: The type of receiver.
71+
[DestinationFieldDestination <String>]: Define the destination's element. The element is the body or the attributes of the message, to which the json array mapper will write the output map.
72+
[DestinationFieldName <String>]: Define a destination field name under the given element. Leaving this empty, means the root of the element. In case element=attributes and fieldName is empty, the object's attributes themselves will contain the key value output pairs.
73+
[JsonArrayMapperKey <List<String>>]: Define the names of the keys in the resulting map. The input json array elements are mapped in order, one for every key.
7174
[OtlpEndpoint <String>]: OTLP GRPC endpoint definition. Example: 0.0.0.0:<port>.
75+
[SourceFieldName <String>]: Define a source field name from which the json array mapper will read the json array. Leaving this empty, means reading the body of the message itself.
7276
[SyslogEndpoint <String>]: Syslog receiver endpoint definition. Example: 0.0.0.0:<port>.
7377
[SyslogProtocol <String>]: Protocol to parse syslog messages. Default rfc3164
7478
[UdpEncoding <String>]: The encoding of the stream being received.
@@ -263,6 +267,15 @@ begin {
263267
$PSBoundParameters['OutBuffer'] = 1
264268
}
265269
$parameterSet = $PSCmdlet.ParameterSetName
270+
271+
$testPlayback = $false
272+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.PipelineGroup.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
273+
274+
$context = Get-AzContext
275+
if (-not $context -and -not $testPlayback) {
276+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
277+
exit
278+
}
266279

267280
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
268281
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -287,8 +300,6 @@ begin {
287300
CreateViaJsonString = 'Az.PipelineGroup.private\New-AzPipelineGroup_CreateViaJsonString';
288301
}
289302
if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
290-
$testPlayback = $false
291-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.PipelineGroup.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
292303
if ($testPlayback) {
293304
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
294305
} else {
@@ -302,6 +313,9 @@ begin {
302313
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
303314
}
304315
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
316+
if ($wrappedCmd -eq $null) {
317+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
318+
}
305319
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
306320
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
307321
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)