Skip to content

Commit 194a139

Browse files
committed
make communiation and support ticket properties required in readme, edit get operation file name, edit calling internal cmdlets for file upload
1 parent de3fcf5 commit 194a139

11 files changed

+105
-169
lines changed

src/Support/Support.Autorest/Az.Support.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.Support.private.dll'
1313
FormatsToProcess = './Az.Support.format.ps1xml'
14-
FunctionsToExport = 'Get-AzSupportChatTranscript', 'Get-AzSupportChatTranscriptsNoSubscription', 'Get-AzSupportCommunication', 'Get-AzSupportCommunicationsNoSubscription', 'Get-AzSupportFile', 'Get-AzSupportFilesNoSubscription', 'Get-AzSupportFileWorkspace', 'Get-AzSupportFileWorkspacesNoSubscription', 'Get-AzSupportOperation', 'Get-AzSupportProblemClassification', 'Get-AzSupportService', 'Get-AzSupportTicket', 'Get-AzSupportTicketChatTranscriptsNoSubscription', 'Get-AzSupportTicketCommunicationsNoSubscription', 'Get-AzSupportTicketsNoSubscription', 'New-AzSupportCommunication', 'New-AzSupportCommunicationsNoSubscription', 'New-AzSupportFileAndUpload', 'New-AzSupportFileAndUploadNoSubscription', 'New-AzSupportFileWorkspace', 'New-AzSupportFileWorkspacesNoSubscription', 'New-AzSupportTicket', 'New-AzSupportTicketsNoSubscription', 'Test-AzSupportCommunicationNameAvailability', 'Test-AzSupportCommunicationsNoSubscriptionNameAvailability', 'Test-AzSupportTicketNameAvailability', 'Test-AzSupportTicketsNoSubscriptionNameAvailability', 'Update-AzSupportCommunication', 'Update-AzSupportCommunicationsNoSubscription', 'Update-AzSupportTicket', 'Update-AzSupportTicketsNoSubscription'
14+
FunctionsToExport = 'Get-AzSupportChatTranscript', 'Get-AzSupportChatTranscriptsNoSubscription', 'Get-AzSupportCommunication', 'Get-AzSupportCommunicationsNoSubscription', 'Get-AzSupportFile', 'Get-AzSupportFilesNoSubscription', 'Get-AzSupportFileWorkspace', 'Get-AzSupportFileWorkspacesNoSubscription', 'Get-AzSupportOperation', 'Get-AzSupportProblemClassification', 'Get-AzSupportService', 'Get-AzSupportTicket', 'Get-AzSupportTicketChatTranscriptsNoSubscription', 'Get-AzSupportTicketCommunicationsNoSubscription', 'Get-AzSupportTicketsNoSubscription', 'New-AzSupportCommunication', 'New-AzSupportCommunicationsNoSubscription', 'New-AzSupportFileAndUpload', 'New-AzSupportFileAndUploadNoSubscription', 'New-AzSupportFileWorkspace', 'New-AzSupportFileWorkspacesNoSubscription', 'New-AzSupportTicket', 'New-AzSupportTicketsNoSubscription', 'Test-AzSupportCommunicationNameAvailability', 'Test-AzSupportCommunicationsNoSubscriptionNameAvailability', 'Test-AzSupportTicketNameAvailability', 'Test-AzSupportTicketsNoSubscriptionNameAvailability', 'Update-AzSupportTicket', 'Update-AzSupportTicketsNoSubscription'
1515
PrivateData = @{
1616
PSData = @{
1717
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Support'

src/Support/Support.Autorest/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ directive:
135135
verb: Update
136136
subject: CommunicationsNoSubscription
137137
remove: true
138+
- from: swagger-document
139+
where: $.definitions.CommunicationDetails
140+
transform: $.required = ['properties']
141+
- from: swagger-document
142+
where: $.definitions.SupportTicketDetails
143+
transform: $.required = ['properties']
144+
138145
# Following are common directives which are normally required in all the RPs
139146
# 1. Remove the unexpanded parameter set
140147
# 2. For New-* cmdlets, ViaIdentity is not required

src/Support/Support.Autorest/custom/Get-AzSupportOperation_List.ps1 renamed to src/Support/Support.Autorest/custom/Get-AzSupportOperation.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Lists all the available Microsoft Support REST API operations.
2727
.Outputs
2828
Microsoft.Azure.PowerShell.Cmdlets.Support.Models.IOperation
2929
.Link
30-
https://learn.microsoft.com/powershell/module/az.support/new-azsupportfile
30+
https://learn.microsoft.com/powershell/module/az.support/get-azsupportoperation
3131
#>
32-
function Get-AzSupportOperation_List {
32+
function Get-AzSupportOperation {
3333
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Support.Models.IOperation])]
3434
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
3535
param(

src/Support/Support.Autorest/custom/New-AzSupportFileAndUpload.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ process {
128128
}
129129

130130
$PSBoundParameters.Remove('FilePath') | Out-Null
131-
New-AzSupportFile -ErrorAction Stop -Name $FileName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks @PSBoundParameters
131+
Az.Support.internal\New-AzSupportFile -ErrorAction Stop -Name $FileName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks @PSBoundParameters
132132

133133
$chunkIndex = 0
134134
$startIndex = 0
135135
$endIndex = $ChunkSize - 1
136136

137137
while($chunkIndex -lt $NumberOfChunks){
138138
$FileContent = [convert]::ToBase64String($FileContentByteArray[$startIndex..$endIndex])
139-
Invoke-AzSupportUploadFile -ErrorAction Stop -FileName $FileName -ChunkIndex $chunkIndex -Content $FileContent @PSBoundParameters
139+
Az.Support.internal\Invoke-AzSupportUploadFile -ErrorAction Stop -FileName $FileName -ChunkIndex $chunkIndex -Content $FileContent @PSBoundParameters
140140
$chunkIndex++
141141
$startIndex = $endIndex + 1
142142
$endIndex = $FileSize - 1

src/Support/Support.Autorest/custom/New-AzSupportFileAndUploadNoSubscription.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,15 @@ process {
122122
}
123123

124124
$PSBoundParameters.Remove('FilePath') | Out-Null
125-
New-AzSupportFilesNoSubscription -ErrorAction Stop -Name $FileName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks @PSBoundParameters
125+
Az.Support.internal\New-AzSupportFilesNoSubscription -ErrorAction Stop -Name $FileName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks @PSBoundParameters
126126

127127
$chunkIndex = 0
128128
$startIndex = 0
129129
$endIndex = $ChunkSize - 1
130130

131131
while($chunkIndex -lt $NumberOfChunks){
132132
$FileContent = [convert]::ToBase64String($FileContentByteArray[$startIndex..$endIndex])
133-
Invoke-AzSupportUploadFilesNoSubscription -ErrorAction Stop -FileName $FileName -ChunkIndex $chunkIndex -Content $FileContent @PSBoundParameters
133+
Az.Support.internal\Invoke-AzSupportUploadFilesNoSubscription -ErrorAction Stop -FileName $FileName -ChunkIndex $chunkIndex -Content $FileContent @PSBoundParameters
134134
$chunkIndex++
135135
$startIndex = $endIndex + 1
136136
$endIndex = $FileSize - 1

src/Support/Support.Autorest/docs/Az.Support.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ This API should be used to check the uniqueness of the name for support ticket c
114114
Check the availability of a resource name.
115115
This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription.
116116

117-
### [Update-AzSupportCommunication](Update-AzSupportCommunication.md)
118-
Adds a new customer communication to an Azure support ticket.
119-
120-
### [Update-AzSupportCommunicationsNoSubscription](Update-AzSupportCommunicationsNoSubscription.md)
121-
Adds a new customer communication to an Azure support ticket.
122-
123117
### [Update-AzSupportTicket](Update-AzSupportTicket.md)
124118
This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.\<br/\>\<br/\>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer.
125119
In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.

src/Support/Support.Autorest/docs/Get-AzSupportOperation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Get-AzSupportOperation [-DefaultProfile <PSObject>] [<CommonParameters>]
1717
```
1818

1919
## DESCRIPTION
20-
20+
Lists all the available Microsoft Support REST API operations.
2121

2222
## EXAMPLES
2323

@@ -46,7 +46,8 @@ Lists all the available Microsoft Support REST API operations.
4646
## PARAMETERS
4747

4848
### -DefaultProfile
49-
49+
The DefaultProfile parameter is not functional.
50+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5051

5152
```yaml
5253
Type: System.Management.Automation.PSObject
@@ -63,7 +64,6 @@ Accept wildcard characters: False
6364
### CommonParameters
6465
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).
6566
66-
6767
## INPUTS
6868
6969
## OUTPUTS

src/Support/Support.Autorest/docs/New-AzSupportCommunication.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Adds a new customer communication to an Azure support ticket.
1313
## SYNTAX
1414

1515
```
16-
New-AzSupportCommunication -Name <String> -SupportTicketName <String> [-SubscriptionId <String>]
17-
[-Body <String>] [-Sender <String>] [-Subject <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
18-
[-Confirm] [-WhatIf] [<CommonParameters>]
16+
New-AzSupportCommunication -Name <String> -SupportTicketName <String> -Body <String> -Subject <String>
17+
[-SubscriptionId <String>] [-Sender <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm]
18+
[-WhatIf] [<CommonParameters>]
1919
```
2020

2121
## DESCRIPTION
@@ -69,7 +69,7 @@ Type: System.String
6969
Parameter Sets: (All)
7070
Aliases:
7171

72-
Required: False
72+
Required: True
7373
Position: Named
7474
Default value: None
7575
Accept pipeline input: False
@@ -146,7 +146,7 @@ Type: System.String
146146
Parameter Sets: (All)
147147
Aliases:
148148

149-
Required: False
149+
Required: True
150150
Position: Named
151151
Default value: None
152152
Accept pipeline input: False

src/Support/Support.Autorest/docs/New-AzSupportCommunicationsNoSubscription.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Adds a new customer communication to an Azure support ticket.
1414

1515
```
1616
New-AzSupportCommunicationsNoSubscription -CommunicationName <String> -SupportTicketName <String>
17-
[-Body <String>] [-Sender <String>] [-Subject <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
17+
-Body <String> -Subject <String> [-Sender <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
1818
[-Confirm] [-WhatIf] [<CommonParameters>]
1919
```
2020

@@ -70,7 +70,7 @@ Type: System.String
7070
Parameter Sets: (All)
7171
Aliases:
7272

73-
Required: False
73+
Required: True
7474
Position: Named
7575
Default value: None
7676
Accept pipeline input: False
@@ -147,7 +147,7 @@ Type: System.String
147147
Parameter Sets: (All)
148148
Aliases:
149149

150-
Required: False
150+
Required: True
151151
Position: Named
152152
Default value: None
153153
Accept pipeline input: False

src/Support/Support.Autorest/docs/New-AzSupportTicket.md

Lines changed: 40 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ The auxiliary token will be from the Cloud solution provider (CSP) partner tenan
1919
## SYNTAX
2020

2121
```
22-
New-AzSupportTicket -Name <String> [-SubscriptionId <String>] [-AdvancedDiagnosticConsent <String>]
23-
[-ContactDetailAdditionalEmailAddress <String[]>] [-ContactDetailCountry <String>]
24-
[-ContactDetailFirstName <String>] [-ContactDetailLastName <String>] [-ContactDetailPhoneNumber <String>]
25-
[-ContactDetailPreferredContactMethod <String>] [-ContactDetailPreferredSupportLanguage <String>]
26-
[-ContactDetailPreferredTimeZone <String>] [-ContactDetailPrimaryEmailAddress <String>]
27-
[-Description <String>] [-FileWorkspaceName <String>] [-ProblemClassificationId <String>]
28-
[-ProblemScopingQuestion <String>] [-ProblemStartTime <DateTime>]
29-
[-QuotaTicketDetailQuotaChangeRequest <IQuotaChangeRequest[]>]
22+
New-AzSupportTicket -Name <String> -ContactDetailCountry <String> -ContactDetailFirstName <String>
23+
-ContactDetailLastName <String> -ContactDetailPreferredContactMethod <String>
24+
-ContactDetailPreferredSupportLanguage <String> -ContactDetailPreferredTimeZone <String>
25+
-ContactDetailPrimaryEmailAddress <String> -Description <String> -ProblemClassificationId <String>
26+
-ServiceId <String> -Severity <String> -Title <String> [-SubscriptionId <String>]
27+
[-AdvancedDiagnosticConsent <String>] [-ContactDetailAdditionalEmailAddress <String[]>]
28+
[-ContactDetailPhoneNumber <String>] [-FileWorkspaceName <String>] [-ProblemScopingQuestion <String>]
29+
[-ProblemStartTime <DateTime>] [-QuotaTicketDetailQuotaChangeRequest <IQuotaChangeRequest[]>]
3030
[-QuotaTicketDetailQuotaChangeRequestSubType <String>] [-QuotaTicketDetailQuotaChangeRequestVersion <String>]
31-
[-Require24X7Response] [-SecondaryConsent <ISecondaryConsent[]>] [-ServiceId <String>] [-Severity <String>]
32-
[-SupportPlanId <String>] [-SupportTicketId <String>] [-TechnicalTicketDetailResourceId <String>]
33-
[-Title <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
31+
[-Require24X7Response] [-SecondaryConsent <ISecondaryConsent[]>] [-SupportPlanId <String>]
32+
[-SupportTicketId <String>] [-TechnicalTicketDetailResourceId <String>] [-DefaultProfile <PSObject>] [-AsJob]
33+
[-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
3434
```
3535

3636
## DESCRIPTION
@@ -44,60 +44,27 @@ The auxiliary token will be from the Cloud solution provider (CSP) partner tenan
4444

4545
## EXAMPLES
4646

47-
### Example 1: Creates support ticket at subscription level
47+
### Example 1: {{ Add title here }}
4848
```powershell
49-
New-AzSupportTicket -Name "test12345678" -AdvancedDiagnosticConsent "no" -ContactDetailPrimaryEmailAddress "[email protected]" -ContactDetailFirstName "test" -ContactDetailLastName "test" -ContactDetailPreferredContactMethod "email" -ContactDetailPreferredTimeZone "Pacific Standard Time" -ContactDetailPreferredSupportLanguage "en-US" -ContactDetailCountry "usa" -Description "test ticket - please ignore and close" -Severity "minimal" -Title "test ticket - please ignore and close" -ServiceId "/providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc" -ProblemClassificationId "/providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc/problemClassifications/3ec1a070-f242-9ecf-5a7c-e1a88ce029ef"
49+
{{ Add code here }}
5050
```
5151

5252
```output
53-
AdvancedDiagnosticConsent : No
54-
ContactDetailAdditionalEmailAddress :
55-
ContactDetailCountry : USA
56-
ContactDetailFirstName : test
57-
ContactDetailLastName : test
58-
ContactDetailPhoneNumber :
59-
ContactDetailPreferredContactMethod : Email
60-
ContactDetailPreferredSupportLanguage : en-US
61-
ContactDetailPreferredTimeZone : Pacific Standard Time
62-
ContactDetailPrimaryEmailAddress : [email protected]
63-
CreatedDate : 2/22/2024 6:48:38 AM
64-
Description : test ticket - please ignore and close
65-
EnrollmentId :
66-
FileWorkspaceName : 2402220010002574
67-
Id : /subscriptions/76cb77fa-8b17-4eab-9493-b65dace99813/providers/Microsoft.Su
68-
pport/supportTickets/test12345678
69-
ModifiedDate : 2/22/2024 6:48:50 AM
70-
Name : test12345678
71-
ProblemClassificationDisplayName : Add or update VAT, tax id, PO number or profile information
72-
ProblemClassificationId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc
73-
/problemClassifications/3ec1a070-f242-9ecf-5a7c-e1a88ce029ef
74-
ProblemScopingQuestion :
75-
ProblemStartTime :
76-
QuotaTicketDetailQuotaChangeRequest :
77-
QuotaTicketDetailQuotaChangeRequestSubType :
78-
QuotaTicketDetailQuotaChangeRequestVersion :
79-
Require24X7Response : False
80-
ResourceGroupName :
81-
SecondaryConsent :
82-
ServiceDisplayName : Billing
83-
ServiceId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc
84-
ServiceLevelAgreementExpirationTime : 2/22/2024 10:00:00 PM
85-
ServiceLevelAgreementSlaMinute : 480
86-
ServiceLevelAgreementStartTime : 2/22/2024 6:48:38 AM
87-
Severity : Minimal
88-
Status : Open
89-
SupportEngineerEmailAddress :
90-
SupportPlanDisplayName : Azure Support Plan - Internal
91-
SupportPlanId : U291cmNlOkVBLFN1YnNjcmlwdGlvbklkOjc2Q0I3N0ZBLThCMTctNEVBQi05NDkzLUI2NURBQ0
92-
U5OTgxMyxPZmZlcklkOk1TLUFaUi0wMDE1UCxTb3ZlcmVpZ25DbG91ZDpQdWJsaWMs
93-
SupportPlanType : Azure Internal
94-
SupportTicketId : 2402220010002574
95-
TechnicalTicketDetailResourceId :
96-
Title : test ticket - please ignore and close
97-
Type : Microsoft.Support/supportTickets
98-
```
99-
100-
Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription
53+
{{ Add output here (remove the output block if the example doesn't have an output) }}
54+
```
55+
56+
{{ Add description here }}
57+
58+
### Example 2: {{ Add title here }}
59+
```powershell
60+
{{ Add code here }}
61+
```
62+
63+
```output
64+
{{ Add output here (remove the output block if the example doesn't have an output) }}
65+
```
66+
67+
{{ Add description here }}
10168

10269
## PARAMETERS
10370

@@ -155,7 +122,7 @@ Type: System.String
155122
Parameter Sets: (All)
156123
Aliases:
157124

158-
Required: False
125+
Required: True
159126
Position: Named
160127
Default value: None
161128
Accept pipeline input: False
@@ -170,7 +137,7 @@ Type: System.String
170137
Parameter Sets: (All)
171138
Aliases:
172139

173-
Required: False
140+
Required: True
174141
Position: Named
175142
Default value: None
176143
Accept pipeline input: False
@@ -185,7 +152,7 @@ Type: System.String
185152
Parameter Sets: (All)
186153
Aliases:
187154

188-
Required: False
155+
Required: True
189156
Position: Named
190157
Default value: None
191158
Accept pipeline input: False
@@ -216,7 +183,7 @@ Type: System.String
216183
Parameter Sets: (All)
217184
Aliases:
218185

219-
Required: False
186+
Required: True
220187
Position: Named
221188
Default value: None
222189
Accept pipeline input: False
@@ -235,7 +202,7 @@ Type: System.String
235202
Parameter Sets: (All)
236203
Aliases:
237204

238-
Required: False
205+
Required: True
239206
Position: Named
240207
Default value: None
241208
Accept pipeline input: False
@@ -251,7 +218,7 @@ Type: System.String
251218
Parameter Sets: (All)
252219
Aliases:
253220

254-
Required: False
221+
Required: True
255222
Position: Named
256223
Default value: None
257224
Accept pipeline input: False
@@ -266,7 +233,7 @@ Type: System.String
266233
Parameter Sets: (All)
267234
Aliases:
268235

269-
Required: False
236+
Required: True
270237
Position: Named
271238
Default value: None
272239
Accept pipeline input: False
@@ -297,7 +264,7 @@ Type: System.String
297264
Parameter Sets: (All)
298265
Aliases:
299266

300-
Required: False
267+
Required: True
301268
Position: Named
302269
Default value: None
303270
Accept pipeline input: False
@@ -358,7 +325,7 @@ Type: System.String
358325
Parameter Sets: (All)
359326
Aliases:
360327

361-
Required: False
328+
Required: True
362329
Position: Named
363330
Default value: None
364331
Accept pipeline input: False
@@ -480,7 +447,7 @@ Type: System.String
480447
Parameter Sets: (All)
481448
Aliases:
482449

483-
Required: False
450+
Required: True
484451
Position: Named
485452
Default value: None
486453
Accept pipeline input: False
@@ -496,7 +463,7 @@ Type: System.String
496463
Parameter Sets: (All)
497464
Aliases:
498465

499-
Required: False
466+
Required: True
500467
Position: Named
501468
Default value: None
502469
Accept pipeline input: False
@@ -571,7 +538,7 @@ Type: System.String
571538
Parameter Sets: (All)
572539
Aliases:
573540

574-
Required: False
541+
Required: True
575542
Position: Named
576543
Default value: None
577544
Accept pipeline input: False

0 commit comments

Comments
 (0)