From a6c112f692c028c8da465fe31e4f2a7b03657de4 Mon Sep 17 00:00:00 2001 From: grhuangmsft <103289214+grhuangmsft@users.noreply.github.com> Date: Thu, 14 Mar 2024 03:13:20 -0400 Subject: [PATCH] add breaking change announcements for Az.Support (#24359) --- src/Support/Support/ChangeLog.md | 29 +++++++++++++++++++ .../GetAzSupportTicketCommunication.cs | 6 ++++ .../NewAzSupportTicketCommunication.cs | 3 ++ .../GetAzSupportProblemClassification.cs | 4 +++ .../Support/Services/GetAzSupportService.cs | 3 ++ .../SupportTickets/GetAzSupportTicket.cs | 12 ++++++++ .../NewAzSupportContactProfileObject.cs | 2 ++ .../SupportTickets/NewAzSupportTicket.cs | 25 ++++++++++++++++ .../SupportTickets/UpdateAzSupportTicket.cs | 19 ++++++++++++ 9 files changed, 103 insertions(+) diff --git a/src/Support/Support/ChangeLog.md b/src/Support/Support/ChangeLog.md index 56f9adb57ef0..b6c639b5f47a 100644 --- a/src/Support/Support/ChangeLog.md +++ b/src/Support/Support/ChangeLog.md @@ -19,6 +19,35 @@ --> ## Upcoming Release +* Added breaking change warning messages for cmdlet deprecation + - New-AzSupportContactProfileObject +* Added breaking change warning messages for cmdlet rename + - Get-AzSupportTicketCommunication + - New-AzSupportTicketCommunication +* Added breaking change warning messages for parameter name and/or structure changes + - Get-AzSupportService + - Get-AzSupportProblemClassification + - Get-AzSupportTicketCommunication + - Get-AzSupportTicket + - New-AzSupportTicket + - Update-AzSupportTicket +* Added breaking change warning messages for output property name and/or structure changes + - Get-AzSupportService + - Get-AzSupportTicket + - New-AzSupportTicket + - Update-AzSupportTicket +* Added breaking change warning messages for new required parameters + - New-AzSupportTicket +* Added breaking change warning messages for removed parameters + - Get-AzSupportTicket + - Get-AzSupportTicketCommunication + - New-AzSupportTicket +* Added breaking change warning message for removal of pipe parameter set for list/new + - New-AzSupportTicketCommunication + - Get-AzSupportProblemClassification + - Get-AzSupportTicketCommunication +* Added breaking change warning message for Get-AzSupportTicket retrieving tickets from the past week if no other parameters are specified + - Get-AzSupportTicket ## Version 1.0.0 * General availability of `Az.Support` module diff --git a/src/Support/Support/Communications/GetAzSupportTicketCommunication.cs b/src/Support/Support/Communications/GetAzSupportTicketCommunication.cs index c72f5352a76e..25405ebdd954 100644 --- a/src/Support/Support/Communications/GetAzSupportTicketCommunication.cs +++ b/src/Support/Support/Communications/GetAzSupportTicketCommunication.cs @@ -19,6 +19,7 @@ using Microsoft.Azure.Management.Support; using Microsoft.Azure.Management.Support.Models; using Microsoft.Rest.Azure; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Generic; @@ -27,6 +28,11 @@ namespace Microsoft.Azure.Commands.Support.Communications { + [GenericBreakingChangeWithVersion("The cmdlet Get-AzSupportTicketCommunication will be renamed to Get-AzSupportCommunication", "12.0.0", "2.0.0")] + [GenericBreakingChangeWithVersion("Input parameter 'Skip' will be removed", "12.0.0", "2.0.0")] + [GenericBreakingChangeWithVersion("Input parameter 'IncludeTotalCount' will be removed", "12.0.0", "2.0.0")] + [GenericBreakingChangeWithVersion("Parameter 'First' will be renamed to 'Top'", "12.0.0", "2.0.0")] + [GenericBreakingChangeWithVersion("Piping of Get-AzSupportTicketCommunication with a support ticket object will no longer be supported for list. Get via piping will still be supported.", "12.0.0", "2.0.0")] [Cmdlet(VerbsCommon.Get, AzureRMConstants.AzureRMPrefix + "SupportTicketCommunication", DefaultParameterSetName = GetByNameParameterSet, SupportsPaging = true), OutputType(typeof(PSSupportTicketCommunication))] public class GetAzSupportTicketCommunication : AzSupportCmdletBase { diff --git a/src/Support/Support/Communications/NewAzSupportTicketCommunication.cs b/src/Support/Support/Communications/NewAzSupportTicketCommunication.cs index 70361367bb79..2a3dcc5bdf2f 100644 --- a/src/Support/Support/Communications/NewAzSupportTicketCommunication.cs +++ b/src/Support/Support/Communications/NewAzSupportTicketCommunication.cs @@ -18,11 +18,14 @@ using Microsoft.Azure.Commands.Support.Models; using Microsoft.Azure.Management.Support; using Microsoft.Azure.Management.Support.Models; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Management.Automation; namespace Microsoft.Azure.Commands.Support.Communications { + [GenericBreakingChangeWithVersion("The cmdlet New-AzSupportTicketCommunication will be renamed to New-AzSupportCommunication", "12.0.0", "2.0.0")] + [GenericBreakingChangeWithVersion("Piping of New-AzSupportTicketCommunication with a support ticket object will no longer be supported.", "12.0.0", "2.0.0")] [Cmdlet(VerbsCommon.New, AzureRMConstants.AzureRMPrefix + "SupportTicketCommunication", DefaultParameterSetName = CreateByNameParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSSupportTicketCommunication))] public class NewAzSupportTicketCommunication : AzSupportCmdletBase diff --git a/src/Support/Support/ProblemClassifications/GetAzSupportProblemClassification.cs b/src/Support/Support/ProblemClassifications/GetAzSupportProblemClassification.cs index 107850b76cd8..7168696e570e 100644 --- a/src/Support/Support/ProblemClassifications/GetAzSupportProblemClassification.cs +++ b/src/Support/Support/ProblemClassifications/GetAzSupportProblemClassification.cs @@ -19,6 +19,7 @@ using Microsoft.Azure.Management.Support; using Microsoft.Azure.Management.Support.Models; using Microsoft.Azure.PowerShell.Cmdlets.Support.ArgumentCompleters; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Linq; using System.Management.Automation; @@ -26,15 +27,18 @@ namespace Microsoft.Azure.Commands.Support.ProblemClassifications { + [GenericBreakingChangeWithVersion("Piping of Get-AzSupportProblemClassification with a service object will no longer be supported for list. Get via piping will still be supported.", "12.0.0", "2.0.0")] [Cmdlet(VerbsCommon.Get, AzureRMConstants.AzureRMPrefix + "SupportProblemClassification", DefaultParameterSetName = GetByNameParameterSet), OutputType(typeof(PSSupportProblemClassification))] public class GetAzSupportProblemClassification : AzSupportCmdletBase { + [CmdletParameterBreakingChangeWithVersion("ServiceId", "12.0.0", "2.0.0", ChangeDescription = "Parameter name 'ServiceId' will be changed to 'ServiceName'.")] [Parameter(Mandatory = true, ParameterSetName = GetByNameParameterSet, HelpMessage = "Service id for which all problem classifications are retrieved.")] [Alias("ServiceName")] [ServiceIdCompleter()] [ValidateNotNullOrEmpty] public string ServiceId { get; set; } + [CmdletParameterBreakingChangeWithVersion("Id", "12.0.0", "2.0.0", ChangeDescription = "Parameter name 'Id' will be changed to 'Name'.")] [Parameter(Mandatory = false, ParameterSetName = GetByNameParameterSet, HelpMessage = "Problem classification id.")] [Parameter(Mandatory = false, ParameterSetName = GetByParentObjectParameterSet, HelpMessage = "Problem classification id.")] [Alias("Name")] diff --git a/src/Support/Support/Services/GetAzSupportService.cs b/src/Support/Support/Services/GetAzSupportService.cs index 889a8f8188d1..1006bb5a3d6c 100644 --- a/src/Support/Support/Services/GetAzSupportService.cs +++ b/src/Support/Support/Services/GetAzSupportService.cs @@ -19,15 +19,18 @@ using Microsoft.Azure.Management.Support; using Microsoft.Azure.Management.Support.Models; using Microsoft.Azure.PowerShell.Cmdlets.Support.ArgumentCompleters; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Linq; using System.Management.Automation; using static Microsoft.Azure.Commands.Support.Helpers.ResourceIdentifierHelper; namespace Microsoft.Azure.Commands.Support.Services { + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportService), "12.0.0", "2.0.0", ChangeDescription = "Output property name 'ResourceTypes' will be changed to 'ResourceType'.")] [Cmdlet(VerbsCommon.Get, AzureRMConstants.AzureRMPrefix + "SupportService", DefaultParameterSetName = ListParameterSet), OutputType(typeof(PSSupportService))] public class GetAzSupportService : AzSupportCmdletBase { + [CmdletParameterBreakingChangeWithVersion("Id", "12.0.0", "2.0.0", ChangeDescription = "Parameter name 'Id' will be changed to 'Name'.")] [Parameter(Mandatory = true, ParameterSetName = GetByNameParameterSet, HelpMessage = "Service id.")] [Alias("Name")] [ServiceIdCompleter()] diff --git a/src/Support/Support/SupportTickets/GetAzSupportTicket.cs b/src/Support/Support/SupportTickets/GetAzSupportTicket.cs index 5dc7a0c5f150..25815d7357f2 100644 --- a/src/Support/Support/SupportTickets/GetAzSupportTicket.cs +++ b/src/Support/Support/SupportTickets/GetAzSupportTicket.cs @@ -19,6 +19,7 @@ using Microsoft.Azure.Management.Support; using Microsoft.Azure.Management.Support.Models; using Microsoft.Rest.Azure; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System; using System.Collections.Generic; using System.Linq; @@ -26,6 +27,17 @@ namespace Microsoft.Azure.Commands.Support.SupportTickets { + [GenericBreakingChangeWithVersion("Input parameter 'Skip' will be removed", "12.0.0", "2.0.0")] + [GenericBreakingChangeWithVersion("Input parameter 'IncludeTotalCount' will be removed", "12.0.0", "2.0.0")] + [GenericBreakingChangeWithVersion("Parameter 'First' will be renamed to 'Top'", "12.0.0", "2.0.0")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property ContactDetail will be deprecated. Use properties ContactDetailAdditionalEmailAddress," + + "ContactDetailCountry, ContactDetailFirstName, ContactDetailLastName, ContactDetailPhoneNumber, ContactDetailPreferredContactMethod, ContactDetailPreferredSupportLanguage, ContactDetailPreferredTimeZone, " + + "and ContactDetailPrimaryEmailAddress instead" )] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property SupportEngineer will be deprecated. Use property SupportEngineerEmailAddress instead")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property QuotaTicketDetail will be deprecated. Use properties QuotaTicketDetailQuotaChangeRequest," + + "QuotaTicketDetailQuotaChangeRequestSubType, QuotaTicketDetailQuotaChangeRequestVersion instead")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The output property TechnicalTicketResourceId will be changed to TechnicalTicketDetailResourceId")] + [GenericBreakingChangeWithVersion("If no parameters are specified, Get-AzSupportTicket will return support tickets from the last week be default", "12.0.0", "2.0.0")] [Cmdlet(VerbsCommon.Get, AzureRMConstants.AzureRMPrefix + "SupportTicket", DefaultParameterSetName = ListParameterSet, SupportsPaging = true), OutputType(typeof(PSSupportTicket))] public class GetAzSupportTicket : AzSupportCmdletBase diff --git a/src/Support/Support/SupportTickets/NewAzSupportContactProfileObject.cs b/src/Support/Support/SupportTickets/NewAzSupportContactProfileObject.cs index 2d06df61774f..5eefae5a3ffb 100644 --- a/src/Support/Support/SupportTickets/NewAzSupportContactProfileObject.cs +++ b/src/Support/Support/SupportTickets/NewAzSupportContactProfileObject.cs @@ -16,10 +16,12 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Support.Common; using Microsoft.Azure.Commands.Support.Models; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Management.Automation; namespace Microsoft.Azure.PowerShell.Cmdlets.Support.SupportTickets { + [CmdletDeprecationWithVersion("12.0.0", "2.0.0")] [Cmdlet(VerbsCommon.New, AzureRMConstants.AzureRMPrefix + "SupportContactProfileObject", SupportsShouldProcess = true), OutputType(typeof(PSContactProfile))] public class NewAzSupportContactProfileObject : AzSupportCmdletBase diff --git a/src/Support/Support/SupportTickets/NewAzSupportTicket.cs b/src/Support/Support/SupportTickets/NewAzSupportTicket.cs index 8ba88cf2b73b..9c9b60e896f6 100644 --- a/src/Support/Support/SupportTickets/NewAzSupportTicket.cs +++ b/src/Support/Support/SupportTickets/NewAzSupportTicket.cs @@ -25,6 +25,7 @@ using Microsoft.Azure.Management.Support; using Microsoft.Azure.Management.Support.Models; using Microsoft.Rest.Azure.OData; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Generic; @@ -34,6 +35,15 @@ namespace Microsoft.Azure.Commands.Support.SupportTickets { + [GenericBreakingChangeWithVersion("New parameter 'ServiceId' will be required", "12.0.0", "2.0.0")] + [GenericBreakingChangeWithVersion("New parameter 'AdvancedDiagnosticConsent' will be required", "12.0.0", "2.0.0")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property ContactDetail will be deprecated. Use properties ContactDetailAdditionalEmailAddress," + + "ContactDetailCountry, ContactDetailFirstName, ContactDetailLastName, ContactDetailPhoneNumber, ContactDetailPreferredContactMethod, ContactDetailPreferredSupportLanguage, ContactDetailPreferredTimeZone, " + + "and ContactDetailPrimaryEmailAddress instead")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property SupportEngineer will be deprecated. Use property SupportEngineerEmailAddress instead")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property QuotaTicketDetail will be deprecated. Use properties QuotaTicketDetailQuotaChangeRequest," + + "QuotaTicketDetailQuotaChangeRequestSubType, QuotaTicketDetailQuotaChangeRequestVersion instead")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The output property TechnicalTicketResourceId will be changed to TechnicalTicketDetailResourceId")] [Cmdlet(VerbsCommon.New, AzureRMConstants.AzureRMPrefix + "SupportTicket", DefaultParameterSetName = CreateSupportTicketWithContactDetailParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSSupportTicket))] public class NewAzSupportTicket : AzSupportCmdletBase @@ -66,47 +76,56 @@ public class NewAzSupportTicket : AzSupportCmdletBase [Parameter(Mandatory = true, HelpMessage = "Severity of the support ticket. This indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure.")] public Severity Severity { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerContactDetail", "12.0.0", "2.0.0", ChangeDescription = "CustomerContactDetail will be removed. Use new parameters ContactDetailCountry, ContactDetailFirstName, ContactDetailLastName," + + "ContactDetailPhoneNumber, ContactDetailPreferredSupportLanguage, ContactDetailPreferredTimeZone, ContactDetailPrimaryEmailAddress, ContactDetailPreferredContactMethod instead.")] [Parameter(Mandatory = true, ParameterSetName = CreateSupportTicketWithContactObjectParameterSet, HelpMessage = "Customer contact details associated with SupportTicket resource.")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactObjectParameterSet, HelpMessage = "Customer contact details associated with SupportTicket resource.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactObjectParameterSet, HelpMessage = "Customer contact details associated with SupportTicket resource.")] [ValidateNotNull] public PSContactProfile CustomerContactDetail { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerFirstName", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerFirstName' will be renamed to 'ContactDetailFirstName'")] [Parameter(Mandatory = true, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer first name.")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer first name.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer first name.")] [ValidateNotNullOrEmpty] public string CustomerFirstName { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerLastName", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerLastName' will be renamed to 'ContactDetailLastName'")] [Parameter(Mandatory = true, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer last name.")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer last name.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer last name.")] [ValidateNotNullOrEmpty] public string CustomerLastName { get; set; } + [CmdletParameterBreakingChangeWithVersion("PreferredContactMethdod", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'PreferredContactMethod' will be renamed to 'ContactDetailPreferredContactMethod'")] [Parameter(Mandatory = true, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Preferred contact method.")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Preferred contact method.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Preferred contact method.")] public ContactMethod PreferredContactMethod { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerPrimaryEmailAddress", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerPrimaryEmailAddress' will be renamed to 'ContactDetailPrimaryEmailAddress'")] [Parameter(Mandatory = true, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer primary email address.")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer primary email address.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer primary email address.")] [ValidateNotNullOrEmpty] public string CustomerPrimaryEmailAddress { get; set; } + [CmdletParameterBreakingChangeWithVersion("AdditionalEmailAddress", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'AdditionalEmailAddress' will be renamed to 'ContactDetailAdditionalEmailAddress'")] [Parameter(Mandatory = false, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Additional email addresses. Email addresses listed here will be copied on any correspondence about the support ticket.")] [Parameter(Mandatory = false, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Additional email addresses. Email addresses listed here will be copied on any correspondence about the support ticket.")] [Parameter(Mandatory = false, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Additional email addresses. Email addresses listed here will be copied on any correspondence about the support ticket.")] [ValidateNotNull] public string[] AdditionalEmailAddress { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerPhoneNumber", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerPhoneNumber' will be renamed to 'ContactDetailPhoneNumber'")] [Parameter(Mandatory = false, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer phone number. This is required if preferred contact method is phone.")] [Parameter(Mandatory = false, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer phone number. This is required if preferred contact method is phone.")] [Parameter(Mandatory = false, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer phone number. This is required if preferred contact method is phone.")] [ValidateNotNullOrEmpty] public string CustomerPhoneNumber { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerPreferredTimeZone", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerPreferredTimeZone' will be renamed to 'ContactDetailPreferredTimeZone'")] [Parameter(Mandatory = true, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer preferred time zone. This must be a valid System.TimeZoneInfo.Id value.")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer preferred time zone. This must be a valid System.TimeZoneInfo.Id value.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer preferred time zone. This must be a valid System.TimeZoneInfo.Id value.")] @@ -114,12 +133,14 @@ public class NewAzSupportTicket : AzSupportCmdletBase [ValidateNotNullOrEmpty] public string CustomerPreferredTimeZone { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerCountry", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerCountry' will be renamed to 'ContactDetailCountry'")] [Parameter(Mandatory = true, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer country. This must be a valid ISO Alpha-3 country code (ISO 3166).")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer country. This must be a valid ISO Alpha-3 country code (ISO 3166).")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Customer country. This must be a valid ISO Alpha-3 country code (ISO 3166).")] [ValidateNotNullOrEmpty] public string CustomerCountry { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerPreferredSupportLanguage", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerPreferredSupportLanguage' will be renamed to 'ContactDetailPreferredSupportLanguage'")] [Parameter(Mandatory = true, ParameterSetName = CreateSupportTicketWithContactDetailParameterSet, HelpMessage = "Peferred language of the custom. This must be a valid language-contry code for one of the supported languages listed here https://azure.microsoft.com/en-us/support/faq/.")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "Peferred language of the contact. This must be a valid language-contry code for one of the supported languages listed here https://azure.microsoft.com/en-us/support/faq/.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Peferred language of the contact. This must be a valid language-contry code for one of the supported languages listed here https://azure.microsoft.com/en-us/support/faq/.")] @@ -130,16 +151,20 @@ public class NewAzSupportTicket : AzSupportCmdletBase [Parameter(Mandatory = false, HelpMessage = "Date and time when the problem started.")] public DateTime ProblemStartTime { get; set; } + [CmdletParameterBreakingChangeWithVersion("TechnicalTicketResourceId", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'TechnicalTicketResourceId' will be renamed to 'TechnicalTicketDetailResourceId'")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactDetailParameterSet, HelpMessage = "This is the resource id of the Azure service resource (For example: A virtual machine resource or an HDInsight resource) for which the support ticket is created.")] [Parameter(Mandatory = true, ParameterSetName = CreateTechnicalSupportTicketWithContactObjectParameterSet, HelpMessage = "This is the resource id of the Azure service resource (For example: A virtual machine resource or an HDInsight resource) for which the support ticket is created.")] [ValidateNotNullOrEmpty] public string TechnicalTicketResourceId { get; set; } + [CmdletParameterBreakingChangeWithVersion("QuotaTicketDetail", "12.0.0", "2.0.0", ChangeDescription = "Parameter QuotaTicketDetail will be removed. Use new parameters QuotaTicketDetailQuotaChangeRequest, " + + "QuotaTicketDetailQuotaChangeRequestSubType, QuotaTicketDetailQuotaChangeRequestVersion instead.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactDetailParameterSet, HelpMessage = "Additional details for a Quota support ticket.")] [Parameter(Mandatory = true, ParameterSetName = CreateQuotaSupportTicketWithContactObjectParameterSet, HelpMessage = "Additional details for a Quota support ticket.")] [ValidateNotNull] public PSQuotaTicketDetail QuotaTicketDetail { get; set; } + [CmdletParameterBreakingChangeWithVersion("CSPHomeTenantId", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CSPHomeTenantId' will be removed.")] [Parameter(Mandatory = false, HelpMessage = "This is the home tenant id of the Cloud Solution Provider user trying to create a support ticket for their customer.")] public string CSPHomeTenantId { get; set; } diff --git a/src/Support/Support/SupportTickets/UpdateAzSupportTicket.cs b/src/Support/Support/SupportTickets/UpdateAzSupportTicket.cs index cc3a7eea6404..18f1943b5c2a 100644 --- a/src/Support/Support/SupportTickets/UpdateAzSupportTicket.cs +++ b/src/Support/Support/SupportTickets/UpdateAzSupportTicket.cs @@ -19,6 +19,7 @@ using Microsoft.Azure.Commands.Support.Models; using Microsoft.Azure.Management.Support; using Microsoft.Azure.Management.Support.Models; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Linq; using System.Management.Automation; @@ -26,6 +27,13 @@ namespace Microsoft.Azure.Commands.Support.SupportTickets { + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property ContactDetail will be deprecated. Use properties ContactDetailAdditionalEmailAddress," + + "ContactDetailCountry, ContactDetailFirstName, ContactDetailLastName, ContactDetailPhoneNumber, ContactDetailPreferredContactMethod, ContactDetailPreferredSupportLanguage, ContactDetailPreferredTimeZone, " + + "and ContactDetailPrimaryEmailAddress instead")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property SupportEngineer will be deprecated. Use property SupportEngineerEmailAddress instead")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The child output property QuotaTicketDetail will be deprecated. Use properties QuotaTicketDetailQuotaChangeRequest," + + "QuotaTicketDetailQuotaChangeRequestSubType, QuotaTicketDetailQuotaChangeRequestVersion instead")] + [CmdletOutputBreakingChangeWithVersion(typeof(PSSupportTicket), "12.0.0", "2.0.0", ChangeDescription = "The output property TechnicalTicketResourceId will be changed to TechnicalTicketDetailResourceId")] [Cmdlet(VerbsData.Update, AzureRMConstants.AzureRMPrefix + "SupportTicket", DefaultParameterSetName = UpdateByNameWithContactDetailParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSSupportTicket))] public class UpdateAzSupportTicket : AzSupportCmdletBase { @@ -45,51 +53,62 @@ public class UpdateAzSupportTicket : AzSupportCmdletBase [Parameter(Mandatory = false, HelpMessage = "Update Status of SupportTicket.")] public Status Status { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerContactDetail", "12.0.0", "2.0.0", ChangeDescription = "CustomerContactDetail will be removed. Use new parameters ContactDetailCountry, ContactDetailFirstName, ContactDetailLastName," + + "ContactDetailPhoneNumber, ContactDetailPreferredSupportLanguage, ContactDetailPreferredTimeZone, ContactDetailPrimaryEmailAddress, ContactDetailPreferredContactMethod instead.")] [Parameter(Mandatory = true, ParameterSetName = UpdateByNameWithContactObjectParameterSet, HelpMessage = "Update Contact details on SupportTicket.")] [Parameter(Mandatory = true, ParameterSetName = UpdateByInputObjectWithContactObjectParameterSet, HelpMessage = "Update Contact details on SupportTicket.")] [ValidateNotNull] public PSContactProfile CustomerContactDetail { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerFirstName", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerFirstName' will be renamed to 'ContactDetailFirstName'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Customer first name.")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Customer first name.")] [ValidateNotNullOrEmpty] public string CustomerFirstName { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerLastName", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerLastName' will be renamed to 'ContactDetailLastName'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Customer last name.")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Customer last name.")] [ValidateNotNullOrEmpty] public string CustomerLastName { get; set; } + [CmdletParameterBreakingChangeWithVersion("PreferredContactMethdod", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'PreferredContactMethod' will be renamed to 'ContactDetailPreferredContactMethod'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Preferred contact method.")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Preferred contact method.")] public ContactMethod PreferredContactMethod { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerPrimaryEmailAddress", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerPrimaryEmailAddress' will be renamed to 'ContactDetailPrimaryEmailAddress'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Customer primary email address.")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Customer primary email address.")] [ValidateNotNullOrEmpty] public string CustomerPrimaryEmailAddress { get; set; } + [CmdletParameterBreakingChangeWithVersion("AdditionalEmailAddress", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'AdditionalEmailAddress' will be renamed to 'ContactDetailAdditionalEmailAddress'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Additional email addresses. Email addresses listed here will be copied on any correspondence about the support ticket.")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Additional email addresses. Email addresses listed here will be copied on any correspondence about the support ticket.")] [ValidateNotNull] public string[] AdditionalEmailAddress { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerPhoneNumber", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerPhoneNumber' will be renamed to 'ContactDetailPhoneNumber'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Customer phone number. This is required if preferred contact method is phone.")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Customer phone number. This is required if preferred contact method is phone.")] [ValidateNotNullOrEmpty] public string CustomerPhoneNumber { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerPreferredTimeZone", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerPreferredTimeZone' will be renamed to 'ContactDetailPreferredTimeZone'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Customer preferred time zone. This must be a valid System.TimeZoneInfo.Id value.")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Customer preferred time zone. This must be a valid System.TimeZoneInfo.Id value.")] [PSArgumentCompleter("Afghanistan Standard Time", "Alaskan Standard Time", "Arab Standard Time", "Arabian Standard Time", "Arabic Standard Time", "Argentina Standard Time", "Atlantic Standard Time", "AUS Central Standard Time", "AUS Eastern Standard Time", "Azerbaijan Standard Time", "Azores Standard Time", "Canada Central Standard Time", "Cape Verde Standard Time", "Caucasus Standard Time", "Cen. Australia Standard Time", "Central America Standard Time", "Central Asia Standard Time", "Central Brazilian Standard Time", "Central Europe Standard Time", "Central European Standard Time", "Central Pacific Standard Time", "Central Standard Time", "Central Standard Time (Mexico)", "China Standard Time", "Dateline Standard Time", "E. Africa Standard Time", "E. Australia Standard Time", "E. Europe Standard Time", "E. South America Standard Time", "Eastern Standard Time", "Eastern Standard Time (Mexico)", "Egypt Standard Time", "Ekaterinburg Standard Time", "Fiji Standard Time", "FLE Standard Time", "Georgian Standard Time", "GMT Standard Time", "Greenland Standard Time", "Greenwich Standard Time", "GTB Standard Time", "Hawaiian Standard Time", "India Standard Time", "Iran Standard Time", "Israel Standard Time", "Jordan Standard Time", "Korea Standard Time", "Mauritius Standard Time", "Central Standard Time (Mexico)", "Mid-Atlantic Standard Time", "Middle East Standard Time", "Montevideo Standard Time", "Morocco Standard Time", "Mountain Standard Time", "Mountain Standard Time (Mexico)", "Myanmar Standard Time", "N. Central Asia Standard Time", "Namibia Standard Time", "Nepal Standard Time", "New Zealand Standard Time", "Newfoundland Standard Time", "North Asia East Standard Time", "North Asia Standard Time", "Pacific SA Standard Time", "Pacific Standard Time", "Pacific Standard Time (Mexico)", "Pakistan Standard Time", "Romance Standard Time", "Russian Standard Time", "SA Eastern Standard Time", "SA Pacific Standard Time", "SA Western Standard Time", "Samoa Standard Time", "SE Asia Standard Time", "Singapore Standard Time", "South Africa Standard Time", "Sri Lanka Standard Time", "Taipei Standard Time", "Tasmania Standard Time", "Tokyo Standard Time", "Tonga Standard Time", "Turkey Standard Time", "US Eastern Standard Time", "US Mountain Standard Time", "UTC", "Venezuela Standard Time", "Vladivostok Standard Time", "W. Australia Standard Time", "W. Central Africa Standard Time", "W. Europe Standard Time", "West Asia Standard Time", "West Pacific Standard Time", "Yakutsk Standard Time")] [ValidateNotNullOrEmpty] public string CustomerPreferredTimeZone { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerCountry", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerCountry' will be renamed to 'ContactDetailCountry'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Customer country. This must be a valid ISO Alpha-3 country code (ISO 3166).")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Customer country. This must be a valid ISO Alpha-3 country code (ISO 3166).")] [ValidateNotNullOrEmpty] public string CustomerCountry { get; set; } + [CmdletParameterBreakingChangeWithVersion("CustomerPreferredSupportLanguage", "12.0.0", "2.0.0", ChangeDescription = "Parameter 'CustomerPreferredSupportLanguage' will be renamed to 'ContactDetailPreferredSupportLanguage'")] [Parameter(Mandatory = false, ParameterSetName = UpdateByNameWithContactDetailParameterSet, HelpMessage = "Customer preferred support language. This must be a valid language-contry code for one of the supported languages listed here https://azure.microsoft.com/support/faq/.")] [Parameter(Mandatory = false, ParameterSetName = UpdateByInputObjectWithContactDetailParameterSet, HelpMessage = "Customer preferred support language. This must be a valid language-contry code for one of the supported languages listed here https://azure.microsoft.com/support/faq/.")] [PSArgumentCompleter("en-us", "es-es", "fr-fr", "de-de", "it-it", "ja-jp", "ko-kr", "ru-ru", "pt-br", "zh-tw", "zh-hans")]