@@ -18,7 +18,7 @@ Get support ticket by name parameter set
18
18
#>
19
19
function Get-AzSupportTicketByNameParameterSet
20
20
{
21
- $propertiesCount = 24
21
+ $propertiesCount = 23
22
22
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
23
23
24
24
$queryResult = Get-AzSupportTicket - First 1
@@ -38,13 +38,13 @@ Get support tickets filtered by status
38
38
#>
39
39
function Get-AzSupportTicketFilterByStatus
40
40
{
41
- $propertiesCount = 24
41
+ $propertiesCount = 23
42
42
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
43
43
44
44
$queryResult = Get-AzSupportTicket - First 1 - Filter " Status eq 'Closed'"
45
45
Assert-NotNull $queryResult
46
46
Assert-AreEqual 1 $queryResult.Count
47
-
47
+
48
48
for ($i = 0 ; $i -lt $queryResult.Count ; $i ++ )
49
49
{
50
50
Assert-IsInstance $queryResult [$i ] $cmdletReturnType
@@ -60,7 +60,7 @@ Get support tickets using paging parameter
60
60
#>
61
61
function Get-AzSupportTicketPagingParameters
62
62
{
63
- $propertiesCount = 24
63
+ $propertiesCount = 23
64
64
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
65
65
66
66
$queryResult = Get-AzSupportTicket - First 1 - Skip 1
@@ -81,9 +81,9 @@ New support ticket
81
81
#>
82
82
function New-AzSupportTicketWithContactObject
83
83
{
84
- $result = New-SupportTicketWith24X7Response
84
+ $result = New-SupportTicketWith24X7Response
85
85
86
- $propertiesCount = 24
86
+ $propertiesCount = 23
87
87
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
88
88
Assert-NotNull $result
89
89
Assert-IsInstance $result $cmdletReturnType
@@ -118,14 +118,14 @@ function New-AzSupportTicketQuotaWithContactObject
118
118
$quotaChangeRequest = new-object Microsoft.Azure.Commands.Support.Models.PSQuotaChangeRequest
119
119
$quotaChangeRequest.Region = " EastUS"
120
120
$quotaChangeRequest.Payload = " {`" VMFamily`" :`" Dv2 Series`" ,`" NewLimit`" :516}"
121
-
121
+
122
122
$quotaTicketDetail = new-object Microsoft.Azure.Commands.Support.Models.PSQuotaTicketDetail
123
123
$quotaTicketDetail.QuotaChangeRequestVersion = " 1.0"
124
- $quotaTicketDetail.QuotaChangeRequests = @ ($quotaChangeRequest )
124
+ $quotaTicketDetail.QuotaChangeRequests = @ ($quotaChangeRequest )
125
125
126
126
$result = New-SupportTicketWith24X7Response - serviceDisplayName " Service and subscription limits" - problemClassificationDisplayName " Compute" - quotaTicketDetails $quotaTicketDetail
127
127
128
- $propertiesCount = 24
128
+ $propertiesCount = 23
129
129
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
130
130
Assert-NotNull $result
131
131
Assert-IsInstance $result $cmdletReturnType
@@ -147,7 +147,7 @@ function New-AzSupportTicketTechnicalWithContactObject
147
147
$resource = Get-AzureRmResource - ResourceType " Microsoft.Compute/virtualMachines"
148
148
$result = New-SupportTicketWith24X7Response - serviceDisplayName " Virtual Machine" - technicalTicketResourceId $resource [0 ].Id
149
149
150
- $propertiesCount = 24
150
+ $propertiesCount = 23
151
151
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
152
152
Assert-NotNull $result
153
153
Assert-IsInstance $result $cmdletReturnType
@@ -163,9 +163,9 @@ New support ticket
163
163
#>
164
164
function New-AzSupportTicketWithContactDetail
165
165
{
166
- $result = New-SupportTicketWithContactDetail
166
+ $result = New-SupportTicketWithContactDetail
167
167
168
- $propertiesCount = 24
168
+ $propertiesCount = 23
169
169
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
170
170
Assert-NotNull $result
171
171
Assert-IsInstance $result $cmdletReturnType
@@ -203,11 +203,11 @@ function New-AzSupportTicketQuotaWithContactDetail
203
203
204
204
$quotaTicketDetail = new-object Microsoft.Azure.Commands.Support.Models.PSQuotaTicketDetail
205
205
$quotaTicketDetail.QuotaChangeRequestVersion = " 1.0"
206
- $quotaTicketDetail.QuotaChangeRequests = @ ($quotaChangeRequest )
206
+ $quotaTicketDetail.QuotaChangeRequests = @ ($quotaChangeRequest )
207
207
208
208
$result = New-SupportTicketWithContactDetail - serviceDisplayName " Service and subscription limits" - problemClassificationDisplayName " Compute" - quotaTicketDetails $quotaTicketDetail
209
209
210
- $propertiesCount = 24
210
+ $propertiesCount = 23
211
211
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
212
212
Assert-NotNull $result
213
213
Assert-IsInstance $result $cmdletReturnType
@@ -227,10 +227,10 @@ New technical support ticket
227
227
function New-AzSupportTicketTechnicalWithContactDetail
228
228
{
229
229
$resource = Get-AzureRmResource - ResourceType Microsoft.Compute/ virtualMachines
230
-
230
+
231
231
$result = New-SupportTicketWithContactDetail - serviceDisplayName " Virtual Machine" - technicalTicketResourceId $resource [0 ].Id
232
232
233
- $propertiesCount = 24
233
+ $propertiesCount = 23
234
234
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
235
235
Assert-NotNull $result
236
236
Assert-IsInstance $result $cmdletReturnType
@@ -248,7 +248,7 @@ function New-AzSupportTicketCspWithContactObject
248
248
{
249
249
$result = New-CspSupportTicket - CSPHomeTenantId " 8465bc54-690d-4169-b3fd-dc47631637c2"
250
250
251
- $propertiesCount = 24
251
+ $propertiesCount = 23
252
252
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
253
253
Assert-NotNull $result
254
254
Assert-IsInstance $result $cmdletReturnType
@@ -274,7 +274,7 @@ function Update-AzSupportTicketParentObjectParameterSetWithContactObject
274
274
$contactDetail.AdditionalEmailAddresses = @ (
" [email protected] " )
275
275
$updateTicket = $newTicket | Update-AzSupportTicket - CustomerContactDetail $contactDetail
276
276
277
- $propertiesCount = 24
277
+ $propertiesCount = 23
278
278
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
279
279
Assert-NotNull $updateTicket
280
280
Assert-IsInstance $updateTicket $cmdletReturnType
@@ -297,9 +297,9 @@ Update support ticket by parent object paremeter set with contact object
297
297
function Update-AzSupportTicketParentObjectParameterSetUpdateSeverity
298
298
{
299
299
$newTicket = New-SupportTicketWithContactDetail
300
- $updateTicket = $newTicket | Update-AzSupportTicket - Severity " Critical"
300
+ $updateTicket = $newTicket | Update-AzSupportTicket - Severity " Critical"
301
301
302
- $propertiesCount = 24
302
+ $propertiesCount = 23
303
303
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
304
304
Assert-NotNull $updateTicket
305
305
Assert-IsInstance $updateTicket $cmdletReturnType
@@ -308,6 +308,24 @@ function Update-AzSupportTicketParentObjectParameterSetUpdateSeverity
308
308
Assert-AreEqual " critical" $updateTicket.Severity.ToLower ()
309
309
}
310
310
311
+ <#
312
+ . SYNOPSIS
313
+ Update support ticket by parent object paremeter set with contact object
314
+ #>
315
+ function Update-AzSupportTicketParentObjectParameterSetUpdateStatus
316
+ {
317
+ $newTicket = New-SupportTicketWithContactDetail
318
+ $updateTicket = $newTicket | Update-AzSupportTicket - Status " Closed"
319
+
320
+ $propertiesCount = 23
321
+ $cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
322
+ Assert-NotNull $updateTicket
323
+ Assert-IsInstance $updateTicket $cmdletReturnType
324
+ Assert-PropertiesCount $updateTicket $propertiesCount
325
+ Assert-IsInstance $updateTicket.Name String
326
+ Assert-AreEqual " closed" $updateTicket.Severity.ToLower ()
327
+ }
328
+
311
329
<#
312
330
. SYNOPSIS
313
331
Update support ticket by name parameter set with contact object
@@ -320,7 +338,7 @@ function Update-AzSupportTicketNameParameterSetWithContactObject
320
338
$contactDetail.LastName = " last updated"
321
339
$updateTicket = Update-AzSupportTicket - Name $newTicket.Name - CustomerContactDetail $contactDetail
322
340
323
- $propertiesCount = 24
341
+ $propertiesCount = 23
324
342
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
325
343
Assert-NotNull $updateTicket
326
344
Assert-IsInstance $updateTicket $cmdletReturnType
@@ -339,7 +357,7 @@ function Update-AzSupportTicketNameParameterSetUpdateSeverity
339
357
$newTicket = New-SupportTicketWithContactDetail
340
358
$updateTicket = Update-AzSupportTicket - Name $newTicket.Name - Severity " Critical"
341
359
342
- $propertiesCount = 24
360
+ $propertiesCount = 23
343
361
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
344
362
Assert-NotNull $updateTicket
345
363
Assert-IsInstance $updateTicket $cmdletReturnType
@@ -348,6 +366,24 @@ function Update-AzSupportTicketNameParameterSetUpdateSeverity
348
366
Assert-AreEqual " critical" $updateTicket.Severity.ToLower ()
349
367
}
350
368
369
+ <#
370
+ . SYNOPSIS
371
+ Update support ticket by name parameter set with contact object
372
+ #>
373
+ function Update-AzSupportTicketNameParameterSetUpdateStatus
374
+ {
375
+ $newTicket = New-SupportTicketWithContactDetail
376
+ $updateTicket = Update-AzSupportTicket - Name $newTicket.Name - Status " Closed"
377
+
378
+ $propertiesCount = 23
379
+ $cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
380
+ Assert-NotNull $updateTicket
381
+ Assert-IsInstance $updateTicket $cmdletReturnType
382
+ Assert-PropertiesCount $updateTicket $propertiesCount
383
+ Assert-IsInstance $updateTicket.Name String
384
+ Assert-AreEqual " closed" $updateTicket.Status.ToLower ()
385
+ }
386
+
351
387
<#
352
388
. SYNOPSIS
353
389
Update support ticket by parent object paremeter set with contact detail
@@ -357,7 +393,7 @@ function Update-AzSupportTicketParentObjectParameterSetWithContactDetail
357
393
$newTicket = New-SupportTicketWithContactDetail
358
394
$updateTicket = $newTicket | Update-AzSupportTicket - CustomerFirstName
" first updated" - CustomerLastName
" last updated" - CustomerPrimaryEmailAddress
" [email protected] " - CustomerCountry
" IND" - CustomerPreferredTimeZone
" Eastern Standard Time" - CustomerPreferredSupportLanguage
" ja-jp" - AdditionalEmailAddress
@ (
" [email protected] " )
359
395
360
- $propertiesCount = 24
396
+ $propertiesCount = 23
361
397
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
362
398
Assert-NotNull $updateTicket
363
399
Assert-IsInstance $updateTicket $cmdletReturnType
@@ -382,7 +418,7 @@ function Update-AzSupportTicketNameParameterSetWithContactDetail
382
418
$newTicket = New-SupportTicketWithContactDetail
383
419
$updateTicket = Update-AzSupportTicket - Name
$newTicket.Name - CustomerFirstName
" first updated" - CustomerLastName
" last updated" - CustomerPrimaryEmailAddress
" [email protected] " - CustomerCountry
" IND" - CustomerPreferredTimeZone
" Eastern Standard Time" - CustomerPreferredSupportLanguage
" ja-jp" - AdditionalEmailAddress
@ (
" [email protected] " )
384
420
385
- $propertiesCount = 24
421
+ $propertiesCount = 23
386
422
$cmdletReturnType = " Microsoft.Azure.Commands.Support.Models.PSSupportTicket"
387
423
Assert-NotNull $updateTicket
388
424
Assert-IsInstance $updateTicket $cmdletReturnType
0 commit comments