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
+ Lists all the available Microsoft Support REST API operations.
20
+ . Description
21
+ Lists all the available Microsoft Support REST API operations.
22
+ . Example
23
+ {{ Add code here }}
24
+ . Example
25
+ {{ Add code here }}
26
+
27
+ . Outputs
28
+ Microsoft.Azure.PowerShell.Cmdlets.Support.Models.IOperation
29
+ . Link
30
+ https://learn.microsoft.com/powershell/module/az.support/new-azsupportfile
31
+ #>
32
+ function Get-AzSupportOperation_List {
33
+ [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.Support.Models.IOperation ])]
34
+ [CmdletBinding (DefaultParameterSetName = ' List' , PositionalBinding = $false )]
35
+ param (
36
+ [Parameter ()]
37
+ [Alias (' AzureRMContext' , ' AzureCredential' )]
38
+ [ValidateNotNull ()]
39
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Category (' Azure' )]
40
+ [System.Management.Automation.PSObject ]
41
+ # The DefaultProfile parameter is not functional.
42
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
43
+ ${DefaultProfile} ,
44
+
45
+ [Parameter (DontShow)]
46
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Category (' Runtime' )]
47
+ [System.Management.Automation.SwitchParameter ]
48
+ # Wait for .NET debugger to attach
49
+ ${Break} ,
50
+
51
+ [Parameter (DontShow)]
52
+ [ValidateNotNull ()]
53
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Category (' Runtime' )]
54
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Runtime.SendAsyncStep []]
55
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
56
+ ${HttpPipelineAppend} ,
57
+
58
+ [Parameter (DontShow)]
59
+ [ValidateNotNull ()]
60
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Category (' Runtime' )]
61
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Runtime.SendAsyncStep []]
62
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
63
+ ${HttpPipelinePrepend} ,
64
+
65
+ [Parameter (DontShow)]
66
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Category (' Runtime' )]
67
+ [System.Uri ]
68
+ # The URI for the proxy server to use
69
+ ${Proxy} ,
70
+
71
+ [Parameter (DontShow)]
72
+ [ValidateNotNull ()]
73
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Category (' Runtime' )]
74
+ [System.Management.Automation.PSCredential ]
75
+ # Credentials for a proxy server to use for the remote call
76
+ ${ProxyCredential} ,
77
+
78
+ [Parameter (DontShow)]
79
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Category (' Runtime' )]
80
+ [System.Management.Automation.SwitchParameter ]
81
+ # Use the default credentials for the proxy
82
+ ${ProxyUseDefaultCredentials}
83
+ )
84
+
85
+ begin {
86
+ try {
87
+ $outBuffer = $null
88
+ if ($PSBoundParameters.TryGetValue (' OutBuffer' , [ref ]$outBuffer )) {
89
+ $PSBoundParameters [' OutBuffer' ] = 1
90
+ }
91
+ $parameterSet = $PSCmdlet.ParameterSetName
92
+
93
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion) {
94
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion = $PSVersionTable.PSVersion.ToString ()
95
+ }
96
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::TelemetryId
97
+ if ($preTelemetryId -eq ' ' ) {
98
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::TelemetryId = (New-Guid ).ToString()
99
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.module ]::Instance.Telemetry.Invoke(' Create' , $MyInvocation , $parameterSet , $PSCmdlet )
100
+ } else {
101
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::InternalCalledCmdlets
102
+ if ($internalCalledCmdlets -eq ' ' ) {
103
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
104
+ } else {
105
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::InternalCalledCmdlets += ' ,' + $MyInvocation.MyCommand.Name
106
+ }
107
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::TelemetryId = ' internal'
108
+ }
109
+
110
+ $mapping = @ {
111
+ List = ' Az.Support.private\Get-AzSupportOperation_List' ;
112
+ }
113
+ # if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
114
+ # $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
115
+ # }
116
+ $cmdInfo = Get-Command - Name $mapping [$parameterSet ]
117
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Runtime.MessageAttributeHelper ]::ProcessCustomAttributesAtRuntime($cmdInfo , $MyInvocation , $parameterSet , $PSCmdlet )
118
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Support.Runtime.MessageAttributeHelper ]::ContainsPreviewAttribute($cmdInfo , $MyInvocation )){
119
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.Runtime.MessageAttributeHelper ]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo , $MyInvocation , $parameterSet , $PSCmdlet )
120
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name )
121
+ }
122
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Cmdlet)
123
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters }
124
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline ($MyInvocation.CommandOrigin )
125
+ $steppablePipeline.Begin ($PSCmdlet )
126
+ } catch {
127
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::ClearTelemetryContext()
128
+ throw
129
+ }
130
+ }
131
+
132
+ process {
133
+ try {
134
+ $steppablePipeline.Process ($_ )
135
+ } catch {
136
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::ClearTelemetryContext()
137
+ throw
138
+ }
139
+
140
+ finally {
141
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::TelemetryId
142
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::InternalCalledCmdlets
143
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::ClearTelemetryContext()
144
+ }
145
+
146
+ }
147
+ end {
148
+ try {
149
+ $steppablePipeline.End ()
150
+
151
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::TelemetryId = $backupTelemetryId
152
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::InternalCalledCmdlets = $backupInternalCalledCmdlets
153
+ if ($preTelemetryId -eq ' ' ) {
154
+ [Microsoft.Azure.PowerShell.Cmdlets.Support.module ]::Instance.Telemetry.Invoke(' Send' , $MyInvocation , $parameterSet , $PSCmdlet )
155
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::ClearTelemetryContext()
156
+ }
157
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::TelemetryId = $preTelemetryId
158
+
159
+ } catch {
160
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper ]::ClearTelemetryContext()
161
+ throw
162
+ }
163
+ }
164
+ }
0 commit comments