Skip to content

Commit f2814b4

Browse files
author
Bhavin Shah
committed
updating help files and tests
1 parent 4bfefe0 commit f2814b4

File tree

10 files changed

+213
-175
lines changed

10 files changed

+213
-175
lines changed

src/Support/Support.Test/ScenarioTests/SupportTicketTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void UpdateAzSupportTicketNameParameterSetUpdateSeverity()
139139
[Trait(Category.AcceptanceType, Category.CheckIn)]
140140
public void UpdateAzSupportTicketParentObjectParameterSetUpdateStatus()
141141
{
142-
TestController.NewInstance.RunPowerShellTest(_logger, "Update-AzSupportTicketParentObjectParameterSetUpdateSeverity");
142+
TestController.NewInstance.RunPowerShellTest(_logger, "Update-AzSupportTicketParentObjectParameterSetUpdateStatus");
143143
}
144144

145145
[Fact]

src/Support/Support.Test/ScenarioTests/SupportTicketTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function Update-AzSupportTicketParentObjectParameterSetUpdateStatus
323323
Assert-IsInstance $updateTicket $cmdletReturnType
324324
Assert-PropertiesCount $updateTicket $propertiesCount
325325
Assert-IsInstance $updateTicket.Name String
326-
Assert-AreEqual "closed" $updateTicket.Severity.ToLower()
326+
Assert-AreEqual "closed" $updateTicket.Status.ToLower()
327327
}
328328

329329
<#

src/Support/Support.Test/SessionRecords/Microsoft.Azure.Commands.Support.Test.ScenarioTests.SupportTicketTests/UpdateAzSupportTicketNameParameterSetUpdateStatus.json

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.

src/Support/Support.Test/SessionRecords/Microsoft.Azure.Commands.Support.Test.ScenarioTests.SupportTicketTests/UpdateAzSupportTicketParentObjectParameterSetUpdateStatus.json

Lines changed: 67 additions & 67 deletions
Large diffs are not rendered by default.

src/Support/Support/Az.Support.psd1

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.1.0'
15+
ModuleVersion = '1.0.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -110,15 +110,7 @@ PrivateData = @{
110110
# IconUri = ''
111111

112112
# ReleaseNotes of this module
113-
ReleaseNotes = '* Preview release of ''Az.Support'' module. Added following cmdlets for creation and management of support tickets.
114-
- Get-AzSupportService
115-
- Get-AzSupportProblemClassification
116-
- New-AzSupportContactProfileObject
117-
- New-AzSupportTicket
118-
- Get-AzSupportTicket
119-
- Update-AzSupportTicket
120-
- New-AzSupportTicketCommunication
121-
- Get-AzSupportTicketCommunication'
113+
ReleaseNotes = '* Stable release of ''Az.Support'' module. A support ticket can now be closed using Update-AzSupportTicket cmdlet. A new severity HighestCriticalImpact was added that is available to certain customers. Get-AzSupportService returns one or more ARM ResourceTypes that the service is responsible for. ProductionOutage property was removed from support ticket details object.'
122114

123115
# Prerelease string of this module
124116
# Prerelease = ''

src/Support/Support/SupportTickets/UpdateAzSupportTicket.cs

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2323
using System.Linq;
2424
using System.Management.Automation;
25+
using Status = Microsoft.Azure.Commands.Support.Models.Status;
2526

2627
namespace Microsoft.Azure.Commands.Support.SupportTickets
2728
{
@@ -42,7 +43,7 @@ public class UpdateAzSupportTicket : AzSupportCmdletBase
4243
public Severity Severity { get; set; }
4344

4445
[Parameter(Mandatory = false, HelpMessage = "Update Status of SupportTicket.")]
45-
public Models.Status Status { get; set; }
46+
public Status Status { get; set; }
4647

4748
[Parameter(Mandatory = true, ParameterSetName = UpdateByNameWithContactObjectParameterSet, HelpMessage = "Update Contact details on SupportTicket.")]
4849
[Parameter(Mandatory = true, ParameterSetName = UpdateByInputObjectWithContactObjectParameterSet, HelpMessage = "Update Contact details on SupportTicket.")]
@@ -128,18 +129,29 @@ public override void ExecuteCmdlet()
128129
}
129130
else
130131
{
131-
updateContactProfile = new UpdateContactProfile
132+
if (this.IsParameterBound(c => c.CustomerFirstName) ||
133+
this.IsParameterBound(c => c.CustomerLastName) ||
134+
this.IsParameterBound(c => c.CustomerPrimaryEmailAddress) ||
135+
this.IsParameterBound(c => c.CustomerPreferredTimeZone) ||
136+
this.IsParameterBound(c => c.CustomerPreferredSupportLanguage) ||
137+
this.IsParameterBound(c => c.CustomerPhoneNumber) ||
138+
this.IsParameterBound(c => c.AdditionalEmailAddress) ||
139+
this.IsParameterBound(c => c.CustomerCountry) ||
140+
this.IsParameterBound(c => c.PreferredContactMethod))
132141
{
133-
FirstName = this.IsParameterBound(c => c.CustomerFirstName) ? this.CustomerFirstName : null,
134-
LastName = this.IsParameterBound(c => c.CustomerLastName) ? this.CustomerLastName : null,
135-
PrimaryEmailAddress = this.IsParameterBound(c => c.CustomerPrimaryEmailAddress) ? this.CustomerPrimaryEmailAddress : null,
136-
PreferredTimeZone = this.IsParameterBound(c => c.CustomerPreferredTimeZone) ? this.CustomerPreferredTimeZone : null,
137-
PreferredSupportLanguage = this.IsParameterBound(c => c.CustomerPreferredSupportLanguage) ? this.CustomerPreferredSupportLanguage : null,
138-
PhoneNumber = this.IsParameterBound(c => c.CustomerPhoneNumber) ? this.CustomerPhoneNumber : null,
139-
AdditionalEmailAddresses = this.IsParameterBound(c => c.AdditionalEmailAddress) ? this.AdditionalEmailAddress.ToList() : null,
140-
Country = this.IsParameterBound(c => c.CustomerCountry) ? this.CustomerCountry : null,
141-
PreferredContactMethod = this.IsParameterBound(c => c.PreferredContactMethod) ? this.PreferredContactMethod.ToString() : null
142-
};
142+
updateContactProfile = new UpdateContactProfile
143+
{
144+
FirstName = this.IsParameterBound(c => c.CustomerFirstName) ? this.CustomerFirstName : null,
145+
LastName = this.IsParameterBound(c => c.CustomerLastName) ? this.CustomerLastName : null,
146+
PrimaryEmailAddress = this.IsParameterBound(c => c.CustomerPrimaryEmailAddress) ? this.CustomerPrimaryEmailAddress : null,
147+
PreferredTimeZone = this.IsParameterBound(c => c.CustomerPreferredTimeZone) ? this.CustomerPreferredTimeZone : null,
148+
PreferredSupportLanguage = this.IsParameterBound(c => c.CustomerPreferredSupportLanguage) ? this.CustomerPreferredSupportLanguage : null,
149+
PhoneNumber = this.IsParameterBound(c => c.CustomerPhoneNumber) ? this.CustomerPhoneNumber : null,
150+
AdditionalEmailAddresses = this.IsParameterBound(c => c.AdditionalEmailAddress) ? this.AdditionalEmailAddress.ToList() : null,
151+
Country = this.IsParameterBound(c => c.CustomerCountry) ? this.CustomerCountry : null,
152+
PreferredContactMethod = this.IsParameterBound(c => c.PreferredContactMethod) ? this.PreferredContactMethod.ToString() : null
153+
};
154+
}
143155
}
144156

145157
updateSupportTicket.ContactDetails = updateContactProfile;

src/Support/Support/help/Az.Support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Creates a new Azure support ticket. This operation is modeled on the behavior of
2727
Gets the list of support tickets. You can get full support ticket details by ticket name or filter the support tickets by *Status* or *CreatedDate*.
2828

2929
### [Update-AzSupportTicket](Update-AzSupportTicket.md)
30-
Update a support ticket's severity or customer contact details.
30+
Update a support ticket's severity, status or customer contact details.
3131

3232
### [Get-AzSupportTicketCommunication](Get-AzSupportTicketCommunication.md)
3333
Gets communications for a support ticket. You can also filter support ticket communications by *CreatedDate* or *CommunicationType*.

src/Support/Support/help/Get-AzSupportService.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Get-AzSupportService -Id <String> [-DefaultProfile <IAzureContextContainer>] [<C
2323
```
2424

2525
## DESCRIPTION
26-
Gets the current list of Azure services for which support is available. Each Azure service has its own set of categories called problem classification. Get the current list of problem classification for a service using Get-AzSupportProblemClassification. You can use the service and problem classification GUID to create a new support ticket using New-AzSupportTicket.
26+
Gets the current list of Azure services for which support is available. Each Azure service may contain one of more ARM ResouceTypes that it is responsible for, that you can use to identify the service when creating a technical support ticket for an ARM resource. Each Azure service has its own set of categories called problem classification. Get the current list of problem classification for a service using Get-AzSupportProblemClassification. You can use the service and problem classification GUID to create a new support ticket using New-AzSupportTicket.
2727

2828
Always use the service and problem classification GUIDs obtained programmatically. This practice ensures that you have the most recent set of service and problem classification GUIDs for support ticket creation.
2929

src/Support/Support/help/New-AzSupportTicket.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ This indicates the urgency of the case, which in turn determines the response ti
575575
Type: Microsoft.Azure.Commands.Support.Models.Severity
576576
Parameter Sets: (All)
577577
Aliases:
578-
Accepted values: Minimal, Moderate, Critical
578+
Accepted values: Minimal, Moderate, Critical, HighestCriticalImpact
579579

580580
Required: True
581581
Position: Named

src/Support/Support/help/Update-AzSupportTicket.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Updates support ticket.
1414

1515
### UpdateByNameWithContactDetailParameterSet (Default)
1616
```
17-
Update-AzSupportTicket -Name <String> [-Severity <Severity>] [-CustomerFirstName <String>]
17+
Update-AzSupportTicket -Name <String> [-Severity <Severity>] [-Status <Status>] [-CustomerFirstName <String>]
1818
[-CustomerLastName <String>] [-PreferredContactMethod <ContactMethod>] [-CustomerPrimaryEmailAddress <String>]
1919
[-AdditionalEmailAddress <String[]>] [-CustomerPhoneNumber <String>] [-CustomerPreferredTimeZone <String>]
2020
[-CustomerCountry <String>] [-CustomerPreferredSupportLanguage <String>]
@@ -23,13 +23,13 @@ Update-AzSupportTicket -Name <String> [-Severity <Severity>] [-CustomerFirstName
2323

2424
### UpdateByNameWithContactObjectParameterSet
2525
```
26-
Update-AzSupportTicket -Name <String> [-Severity <Severity>] -CustomerContactDetail <PSContactProfile>
26+
Update-AzSupportTicket -Name <String> [-Severity <Severity>] [-Status <Status>] -CustomerContactDetail <PSContactProfile>
2727
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2828
```
2929

3030
### UpdateByInputObjectWithContactDetailParameterSet
3131
```
32-
Update-AzSupportTicket -InputObject <PSSupportTicket> [-Severity <Severity>] [-CustomerFirstName <String>]
32+
Update-AzSupportTicket -InputObject <PSSupportTicket> [-Severity <Severity>] [-Status <Status>] [-CustomerFirstName <String>]
3333
[-CustomerLastName <String>] [-PreferredContactMethod <ContactMethod>] [-CustomerPrimaryEmailAddress <String>]
3434
[-AdditionalEmailAddress <String[]>] [-CustomerPhoneNumber <String>] [-CustomerPreferredTimeZone <String>]
3535
[-CustomerCountry <String>] [-CustomerPreferredSupportLanguage <String>]
@@ -38,13 +38,13 @@ Update-AzSupportTicket -InputObject <PSSupportTicket> [-Severity <Severity>] [-C
3838

3939
### UpdateByInputObjectWithContactObjectParameterSet
4040
```
41-
Update-AzSupportTicket -InputObject <PSSupportTicket> [-Severity <Severity>]
41+
Update-AzSupportTicket -InputObject <PSSupportTicket> [-Severity <Severity>] [-Status <Status>]
4242
-CustomerContactDetail <PSContactProfile> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
4343
[<CommonParameters>]
4444
```
4545

4646
## DESCRIPTION
47-
Use this cmdlet to update a support ticket's severity level or customer contact details. Note that updating a support ticket's severity level is not allowed when the ticket is assigned to a support engineer. If you wish to update the severity level after ticket assignment, contact the support engineer by sending a communication on the ticket.
47+
Use this cmdlet to update a support ticket's severity level, status or customer contact details. Note that updating a support ticket's severity level or status is not allowed when the ticket is assigned to a support engineer. If you wish to update the severity level or status after ticket assignment, contact the support engineer by sending a communication on the ticket.
4848

4949
## EXAMPLES
5050

@@ -57,7 +57,16 @@ Name Title SupportTicketId Severity ServiceDisplayName
5757
test1 test title1 150010521000317 Moderate Virtual Machine running Linux Open 2/5/2020 1:33:53 AM
5858
```
5959

60-
### Example 2: Update contact details of support ticket by specify contact object.
60+
### Example 2: Update status of support ticket.
61+
```powershell
62+
PS C:\> Update-AzSupportTicket -Name "test1" -Status "Closed"
63+
64+
Name Title SupportTicketId Severity ServiceDisplayName Status CreatedDate
65+
---- ----- --------------- -------- ------------------ ------ -----------
66+
test1 test title1 150010521000317 Moderate Virtual Machine running Linux Closed 2/5/2020 1:33:53 AM
67+
```
68+
69+
### Example 3: Update contact details of support ticket by specify contact object.
6170
```powershell
6271
PS C:\> $contactDetail = new-object Microsoft.Azure.Commands.Support.Models.PSContactProfile
6372
PS C:\> $contactDetail.FirstName = "first name updated"
@@ -69,7 +78,7 @@ Name Title SupportTicketId Severity ServiceDisplayName
6978
test1 test title1 150010521000317 Moderate Virtual Machine running Linux Open 2/5/2020 1:33:53 AM
7079
```
7180

72-
### Example 3: Update severity of support ticket by piping support ticket object.
81+
### Example 4: Update severity of support ticket by piping support ticket object.
7382
```powershell
7483
PS C:\> Get-AzSupportTicket -Name "test1" | Update-AzSupportTicket -Severity "moderate"
7584
@@ -78,7 +87,7 @@ Name Title SupportTicketId Severity ServiceDisplayName
7887
test1 test title1 150010521000317 Moderate Virtual Machine running Linux Open 2/5/2020 1:33:53 AM
7988
```
8089

81-
### Example 4: Update contact details of support ticket by specifying individual contact parameters.
90+
### Example 5: Update contact details of support ticket by specifying individual contact parameters.
8291
```powershell
8392
PS C:\> Update-AzSupportTicket -Name "test1" -CustomerFirstName "first name updated" -CustomerLastName "last name updated" -AdditionalEmailAddress @("[email protected]")
8493
@@ -87,6 +96,15 @@ Name Title SupportTicketId Severity ServiceDisplayName
8796
test1 test title1 150010521000317 Moderate Virtual Machine running Linux Open 2/5/2020 1:33:53 AM
8897
```
8998

99+
### Example 6: Update status of support ticket by piping support ticket object.
100+
```powershell
101+
PS C:\> Get-AzSupportTicket -Name "test1" | Update-AzSupportTicket -Status "Closed"
102+
103+
Name Title SupportTicketId Severity ServiceDisplayName Status CreatedDate
104+
---- ----- --------------- -------- ------------------ ------ -----------
105+
test1 test title1 150010521000317 Moderate Virtual Machine running Linux Closed 2/5/2020 1:33:53 AM
106+
```
107+
90108
## PARAMETERS
91109

92110
### -AdditionalEmailAddress
@@ -297,7 +315,23 @@ Update Severity of SupportTicket.
297315
Type: Microsoft.Azure.Commands.Support.Models.Severity
298316
Parameter Sets: (All)
299317
Aliases:
300-
Accepted values: Minimal, Moderate, Critical
318+
Accepted values: Minimal, Moderate, Critical, HighestCriticalImpact
319+
320+
Required: False
321+
Position: Named
322+
Default value: None
323+
Accept pipeline input: False
324+
Accept wildcard characters: False
325+
```
326+
327+
### -Status
328+
Update Status of SupportTicket.
329+
330+
```yaml
331+
Type: Microsoft.Azure.Commands.Support.Models.Status
332+
Parameter Sets: (All)
333+
Aliases:
334+
Accepted values: Open, Closed
301335

302336
Required: False
303337
Position: Named

0 commit comments

Comments
 (0)