From 194a139efcc90b82e2dc86bcb5fea8facf5dec1b Mon Sep 17 00:00:00 2001 From: "Grace Huang (from Dev Box)" Date: Tue, 5 Mar 2024 11:16:32 -0500 Subject: [PATCH 1/6] make communiation and support ticket properties required in readme, edit get operation file name, edit calling internal cmdlets for file upload --- src/Support/Support.Autorest/Az.Support.psd1 | 2 +- src/Support/Support.Autorest/README.md | 7 ++ ...on_List.ps1 => Get-AzSupportOperation.ps1} | 4 +- .../custom/New-AzSupportFileAndUpload.ps1 | 4 +- ...w-AzSupportFileAndUploadNoSubscription.ps1 | 4 +- .../Support.Autorest/docs/Az.Support.md | 6 - .../docs/Get-AzSupportOperation.md | 6 +- .../docs/New-AzSupportCommunication.md | 10 +- ...w-AzSupportCommunicationsNoSubscription.md | 6 +- .../docs/New-AzSupportTicket.md | 113 +++++++----------- .../New-AzSupportTicketsNoSubscription.md | 112 +++++++---------- 11 files changed, 105 insertions(+), 169 deletions(-) rename src/Support/Support.Autorest/custom/{Get-AzSupportOperation_List.ps1 => Get-AzSupportOperation.ps1} (98%) diff --git a/src/Support/Support.Autorest/Az.Support.psd1 b/src/Support/Support.Autorest/Az.Support.psd1 index d5778ffcde84..198161a20fd5 100644 --- a/src/Support/Support.Autorest/Az.Support.psd1 +++ b/src/Support/Support.Autorest/Az.Support.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Support.private.dll' FormatsToProcess = './Az.Support.format.ps1xml' - 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' + 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' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Support' diff --git a/src/Support/Support.Autorest/README.md b/src/Support/Support.Autorest/README.md index 12f7c2dfa56b..5cc871f74992 100644 --- a/src/Support/Support.Autorest/README.md +++ b/src/Support/Support.Autorest/README.md @@ -135,6 +135,13 @@ directive: verb: Update subject: CommunicationsNoSubscription remove: true + - from: swagger-document + where: $.definitions.CommunicationDetails + transform: $.required = ['properties'] + - from: swagger-document + where: $.definitions.SupportTicketDetails + transform: $.required = ['properties'] + # Following are common directives which are normally required in all the RPs # 1. Remove the unexpanded parameter set # 2. For New-* cmdlets, ViaIdentity is not required diff --git a/src/Support/Support.Autorest/custom/Get-AzSupportOperation_List.ps1 b/src/Support/Support.Autorest/custom/Get-AzSupportOperation.ps1 similarity index 98% rename from src/Support/Support.Autorest/custom/Get-AzSupportOperation_List.ps1 rename to src/Support/Support.Autorest/custom/Get-AzSupportOperation.ps1 index f275172fd78f..ca916e5217a4 100644 --- a/src/Support/Support.Autorest/custom/Get-AzSupportOperation_List.ps1 +++ b/src/Support/Support.Autorest/custom/Get-AzSupportOperation.ps1 @@ -27,9 +27,9 @@ Lists all the available Microsoft Support REST API operations. .Outputs Microsoft.Azure.PowerShell.Cmdlets.Support.Models.IOperation .Link -https://learn.microsoft.com/powershell/module/az.support/new-azsupportfile +https://learn.microsoft.com/powershell/module/az.support/get-azsupportoperation #> -function Get-AzSupportOperation_List { +function Get-AzSupportOperation { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Support.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( diff --git a/src/Support/Support.Autorest/custom/New-AzSupportFileAndUpload.ps1 b/src/Support/Support.Autorest/custom/New-AzSupportFileAndUpload.ps1 index e85797c82678..46a60b11e6fd 100644 --- a/src/Support/Support.Autorest/custom/New-AzSupportFileAndUpload.ps1 +++ b/src/Support/Support.Autorest/custom/New-AzSupportFileAndUpload.ps1 @@ -128,7 +128,7 @@ process { } $PSBoundParameters.Remove('FilePath') | Out-Null - New-AzSupportFile -ErrorAction Stop -Name $FileName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks @PSBoundParameters + Az.Support.internal\New-AzSupportFile -ErrorAction Stop -Name $FileName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks @PSBoundParameters $chunkIndex = 0 $startIndex = 0 @@ -136,7 +136,7 @@ process { while($chunkIndex -lt $NumberOfChunks){ $FileContent = [convert]::ToBase64String($FileContentByteArray[$startIndex..$endIndex]) - Invoke-AzSupportUploadFile -ErrorAction Stop -FileName $FileName -ChunkIndex $chunkIndex -Content $FileContent @PSBoundParameters + Az.Support.internal\Invoke-AzSupportUploadFile -ErrorAction Stop -FileName $FileName -ChunkIndex $chunkIndex -Content $FileContent @PSBoundParameters $chunkIndex++ $startIndex = $endIndex + 1 $endIndex = $FileSize - 1 diff --git a/src/Support/Support.Autorest/custom/New-AzSupportFileAndUploadNoSubscription.ps1 b/src/Support/Support.Autorest/custom/New-AzSupportFileAndUploadNoSubscription.ps1 index f42b5aab7f77..9b416e4fa428 100644 --- a/src/Support/Support.Autorest/custom/New-AzSupportFileAndUploadNoSubscription.ps1 +++ b/src/Support/Support.Autorest/custom/New-AzSupportFileAndUploadNoSubscription.ps1 @@ -122,7 +122,7 @@ process { } $PSBoundParameters.Remove('FilePath') | Out-Null - New-AzSupportFilesNoSubscription -ErrorAction Stop -Name $FileName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks @PSBoundParameters + Az.Support.internal\New-AzSupportFilesNoSubscription -ErrorAction Stop -Name $FileName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks @PSBoundParameters $chunkIndex = 0 $startIndex = 0 @@ -130,7 +130,7 @@ process { while($chunkIndex -lt $NumberOfChunks){ $FileContent = [convert]::ToBase64String($FileContentByteArray[$startIndex..$endIndex]) - Invoke-AzSupportUploadFilesNoSubscription -ErrorAction Stop -FileName $FileName -ChunkIndex $chunkIndex -Content $FileContent @PSBoundParameters + Az.Support.internal\Invoke-AzSupportUploadFilesNoSubscription -ErrorAction Stop -FileName $FileName -ChunkIndex $chunkIndex -Content $FileContent @PSBoundParameters $chunkIndex++ $startIndex = $endIndex + 1 $endIndex = $FileSize - 1 diff --git a/src/Support/Support.Autorest/docs/Az.Support.md b/src/Support/Support.Autorest/docs/Az.Support.md index 1718e7bafa43..870e31483dc2 100644 --- a/src/Support/Support.Autorest/docs/Az.Support.md +++ b/src/Support/Support.Autorest/docs/Az.Support.md @@ -114,12 +114,6 @@ This API should be used to check the uniqueness of the name for support ticket c Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. -### [Update-AzSupportCommunication](Update-AzSupportCommunication.md) -Adds a new customer communication to an Azure support ticket. - -### [Update-AzSupportCommunicationsNoSubscription](Update-AzSupportCommunicationsNoSubscription.md) -Adds a new customer communication to an Azure support ticket. - ### [Update-AzSupportTicket](Update-AzSupportTicket.md) This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.\
\
Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API. diff --git a/src/Support/Support.Autorest/docs/Get-AzSupportOperation.md b/src/Support/Support.Autorest/docs/Get-AzSupportOperation.md index d2666be33222..cd0e6a9d6cea 100644 --- a/src/Support/Support.Autorest/docs/Get-AzSupportOperation.md +++ b/src/Support/Support.Autorest/docs/Get-AzSupportOperation.md @@ -17,7 +17,7 @@ Get-AzSupportOperation [-DefaultProfile ] [] ``` ## DESCRIPTION - +Lists all the available Microsoft Support REST API operations. ## EXAMPLES @@ -46,7 +46,8 @@ Lists all the available Microsoft Support REST API operations. ## PARAMETERS ### -DefaultProfile - +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -63,7 +64,6 @@ Accept wildcard characters: False ### CommonParameters 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). - ## INPUTS ## OUTPUTS diff --git a/src/Support/Support.Autorest/docs/New-AzSupportCommunication.md b/src/Support/Support.Autorest/docs/New-AzSupportCommunication.md index 07a0097e2a25..bbc8da49a12d 100644 --- a/src/Support/Support.Autorest/docs/New-AzSupportCommunication.md +++ b/src/Support/Support.Autorest/docs/New-AzSupportCommunication.md @@ -13,9 +13,9 @@ Adds a new customer communication to an Azure support ticket. ## SYNTAX ``` -New-AzSupportCommunication -Name -SupportTicketName [-SubscriptionId ] - [-Body ] [-Sender ] [-Subject ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] +New-AzSupportCommunication -Name -SupportTicketName -Body -Subject + [-SubscriptionId ] [-Sender ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] ``` ## DESCRIPTION @@ -69,7 +69,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -146,7 +146,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False diff --git a/src/Support/Support.Autorest/docs/New-AzSupportCommunicationsNoSubscription.md b/src/Support/Support.Autorest/docs/New-AzSupportCommunicationsNoSubscription.md index 9a4d1ee6b6ac..7a33f27c510a 100644 --- a/src/Support/Support.Autorest/docs/New-AzSupportCommunicationsNoSubscription.md +++ b/src/Support/Support.Autorest/docs/New-AzSupportCommunicationsNoSubscription.md @@ -14,7 +14,7 @@ Adds a new customer communication to an Azure support ticket. ``` New-AzSupportCommunicationsNoSubscription -CommunicationName -SupportTicketName - [-Body ] [-Sender ] [-Subject ] [-DefaultProfile ] [-AsJob] [-NoWait] + -Body -Subject [-Sender ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -70,7 +70,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -147,7 +147,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False diff --git a/src/Support/Support.Autorest/docs/New-AzSupportTicket.md b/src/Support/Support.Autorest/docs/New-AzSupportTicket.md index d7e68de05948..6003f3f7529a 100644 --- a/src/Support/Support.Autorest/docs/New-AzSupportTicket.md +++ b/src/Support/Support.Autorest/docs/New-AzSupportTicket.md @@ -19,18 +19,18 @@ The auxiliary token will be from the Cloud solution provider (CSP) partner tenan ## SYNTAX ``` -New-AzSupportTicket -Name [-SubscriptionId ] [-AdvancedDiagnosticConsent ] - [-ContactDetailAdditionalEmailAddress ] [-ContactDetailCountry ] - [-ContactDetailFirstName ] [-ContactDetailLastName ] [-ContactDetailPhoneNumber ] - [-ContactDetailPreferredContactMethod ] [-ContactDetailPreferredSupportLanguage ] - [-ContactDetailPreferredTimeZone ] [-ContactDetailPrimaryEmailAddress ] - [-Description ] [-FileWorkspaceName ] [-ProblemClassificationId ] - [-ProblemScopingQuestion ] [-ProblemStartTime ] - [-QuotaTicketDetailQuotaChangeRequest ] +New-AzSupportTicket -Name -ContactDetailCountry -ContactDetailFirstName + -ContactDetailLastName -ContactDetailPreferredContactMethod + -ContactDetailPreferredSupportLanguage -ContactDetailPreferredTimeZone + -ContactDetailPrimaryEmailAddress -Description -ProblemClassificationId + -ServiceId -Severity -Title [-SubscriptionId ] + [-AdvancedDiagnosticConsent ] [-ContactDetailAdditionalEmailAddress ] + [-ContactDetailPhoneNumber ] [-FileWorkspaceName ] [-ProblemScopingQuestion ] + [-ProblemStartTime ] [-QuotaTicketDetailQuotaChangeRequest ] [-QuotaTicketDetailQuotaChangeRequestSubType ] [-QuotaTicketDetailQuotaChangeRequestVersion ] - [-Require24X7Response] [-SecondaryConsent ] [-ServiceId ] [-Severity ] - [-SupportPlanId ] [-SupportTicketId ] [-TechnicalTicketDetailResourceId ] - [-Title ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-Require24X7Response] [-SecondaryConsent ] [-SupportPlanId ] + [-SupportTicketId ] [-TechnicalTicketDetailResourceId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -44,60 +44,27 @@ The auxiliary token will be from the Cloud solution provider (CSP) partner tenan ## EXAMPLES -### Example 1: Creates support ticket at subscription level +### Example 1: {{ Add title here }} ```powershell -New-AzSupportTicket -Name "test12345678" -AdvancedDiagnosticConsent "no" -ContactDetailPrimaryEmailAddress "test@test.com" -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" +{{ Add code here }} ``` ```output -AdvancedDiagnosticConsent : No -ContactDetailAdditionalEmailAddress : -ContactDetailCountry : USA -ContactDetailFirstName : test -ContactDetailLastName : test -ContactDetailPhoneNumber : -ContactDetailPreferredContactMethod : Email -ContactDetailPreferredSupportLanguage : en-US -ContactDetailPreferredTimeZone : Pacific Standard Time -ContactDetailPrimaryEmailAddress : test@test.com -CreatedDate : 2/22/2024 6:48:38 AM -Description : test ticket - please ignore and close -EnrollmentId : -FileWorkspaceName : 2402220010002574 -Id : /subscriptions/76cb77fa-8b17-4eab-9493-b65dace99813/providers/Microsoft.Su - pport/supportTickets/test12345678 -ModifiedDate : 2/22/2024 6:48:50 AM -Name : test12345678 -ProblemClassificationDisplayName : Add or update VAT, tax id, PO number or profile information -ProblemClassificationId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc - /problemClassifications/3ec1a070-f242-9ecf-5a7c-e1a88ce029ef -ProblemScopingQuestion : -ProblemStartTime : -QuotaTicketDetailQuotaChangeRequest : -QuotaTicketDetailQuotaChangeRequestSubType : -QuotaTicketDetailQuotaChangeRequestVersion : -Require24X7Response : False -ResourceGroupName : -SecondaryConsent : -ServiceDisplayName : Billing -ServiceId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc -ServiceLevelAgreementExpirationTime : 2/22/2024 10:00:00 PM -ServiceLevelAgreementSlaMinute : 480 -ServiceLevelAgreementStartTime : 2/22/2024 6:48:38 AM -Severity : Minimal -Status : Open -SupportEngineerEmailAddress : -SupportPlanDisplayName : Azure Support Plan - Internal -SupportPlanId : U291cmNlOkVBLFN1YnNjcmlwdGlvbklkOjc2Q0I3N0ZBLThCMTctNEVBQi05NDkzLUI2NURBQ0 - U5OTgxMyxPZmZlcklkOk1TLUFaUi0wMDE1UCxTb3ZlcmVpZ25DbG91ZDpQdWJsaWMs -SupportPlanType : Azure Internal -SupportTicketId : 2402220010002574 -TechnicalTicketDetailResourceId : -Title : test ticket - please ignore and close -Type : Microsoft.Support/supportTickets -``` - -Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} ## PARAMETERS @@ -155,7 +122,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -170,7 +137,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -185,7 +152,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -216,7 +183,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -235,7 +202,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -251,7 +218,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -266,7 +233,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -297,7 +264,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -358,7 +325,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -480,7 +447,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -496,7 +463,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -571,7 +538,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False diff --git a/src/Support/Support.Autorest/docs/New-AzSupportTicketsNoSubscription.md b/src/Support/Support.Autorest/docs/New-AzSupportTicketsNoSubscription.md index 5ddb250837a3..a7a2ee5397d3 100644 --- a/src/Support/Support.Autorest/docs/New-AzSupportTicketsNoSubscription.md +++ b/src/Support/Support.Autorest/docs/New-AzSupportTicketsNoSubscription.md @@ -16,18 +16,18 @@ The Azure support engineer working on your ticket will reach out to you for cons ## SYNTAX ``` -New-AzSupportTicketsNoSubscription -SupportTicketName [-AdvancedDiagnosticConsent ] - [-ContactDetailAdditionalEmailAddress ] [-ContactDetailCountry ] - [-ContactDetailFirstName ] [-ContactDetailLastName ] [-ContactDetailPhoneNumber ] - [-ContactDetailPreferredContactMethod ] [-ContactDetailPreferredSupportLanguage ] - [-ContactDetailPreferredTimeZone ] [-ContactDetailPrimaryEmailAddress ] - [-Description ] [-FileWorkspaceName ] [-ProblemClassificationId ] - [-ProblemScopingQuestion ] [-ProblemStartTime ] - [-QuotaTicketDetailQuotaChangeRequest ] +New-AzSupportTicketsNoSubscription -SupportTicketName -ContactDetailCountry + -ContactDetailFirstName -ContactDetailLastName + -ContactDetailPreferredContactMethod -ContactDetailPreferredSupportLanguage + -ContactDetailPreferredTimeZone -ContactDetailPrimaryEmailAddress -Description + -ProblemClassificationId -ServiceId -Severity -Title + [-AdvancedDiagnosticConsent ] [-ContactDetailAdditionalEmailAddress ] + [-ContactDetailPhoneNumber ] [-FileWorkspaceName ] [-ProblemScopingQuestion ] + [-ProblemStartTime ] [-QuotaTicketDetailQuotaChangeRequest ] [-QuotaTicketDetailQuotaChangeRequestSubType ] [-QuotaTicketDetailQuotaChangeRequestVersion ] - [-Require24X7Response] [-SecondaryConsent ] [-ServiceId ] [-Severity ] - [-SupportPlanId ] [-SupportTicketId ] [-TechnicalTicketDetailResourceId ] - [-Title ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-Require24X7Response] [-SecondaryConsent ] [-SupportPlanId ] + [-SupportTicketId ] [-TechnicalTicketDetailResourceId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -38,59 +38,27 @@ The Azure support engineer working on your ticket will reach out to you for cons ## EXAMPLES -### Example 1: Creates support ticket at tenant level +### Example 1: {{ Add title here }} ```powershell -New-AzSupportTicketsNoSubscription -SupportTicketName "test12345678" -AdvancedDiagnosticConsent "no" -ContactDetailPrimaryEmailAddress "test@test.com" -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" +{{ Add code here }} ``` ```output -AdvancedDiagnosticConsent : No -ContactDetailAdditionalEmailAddress : -ContactDetailCountry : USA -ContactDetailFirstName : test -ContactDetailLastName : test -ContactDetailPhoneNumber : -ContactDetailPreferredContactMethod : Email -ContactDetailPreferredSupportLanguage : en-US -ContactDetailPreferredTimeZone : Pacific Standard Time -ContactDetailPrimaryEmailAddress : test@test.com -CreatedDate : 2/22/2024 6:51:11 AM -Description : test ticket - please ignore and close -EnrollmentId : -FileWorkspaceName : 2402220010002592 -Id : /providers/Microsoft.Support/supportTickets/test12345678 -ModifiedDate : 2/22/2024 6:51:28 AM -Name : test12345678 -ProblemClassificationDisplayName : Add or update VAT, tax id, PO number or profile information -ProblemClassificationId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc - /problemClassifications/3ec1a070-f242-9ecf-5a7c-e1a88ce029ef -ProblemScopingQuestion : -ProblemStartTime : -QuotaTicketDetailQuotaChangeRequest : -QuotaTicketDetailQuotaChangeRequestSubType : -QuotaTicketDetailQuotaChangeRequestVersion : -Require24X7Response : False -ResourceGroupName : -SecondaryConsent : -ServiceDisplayName : Billing -ServiceId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc -ServiceLevelAgreementExpirationTime : 2/22/2024 10:00:00 PM -ServiceLevelAgreementSlaMinute : 480 -ServiceLevelAgreementStartTime : 2/22/2024 6:51:11 AM -Severity : Minimal -Status : Open -SupportEngineerEmailAddress : -SupportPlanDisplayName : Basic support -SupportPlanId : U291cmNlOkZyZWUsRnJlZUlkOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwOS - w= -SupportPlanType : Basic -SupportTicketId : 2402220010002592 -TechnicalTicketDetailResourceId : -Title : test ticket - please ignore and close -Type : Microsoft.Support/supportTickets -``` - -Creates a new support ticket for Billing, and Subscription Management issues +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here (remove the output block if the example doesn't have an output) }} +``` + +{{ Add description here }} ## PARAMETERS @@ -148,7 +116,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -163,7 +131,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -178,7 +146,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -209,7 +177,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -228,7 +196,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -244,7 +212,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -259,7 +227,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -290,7 +258,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -336,7 +304,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -458,7 +426,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -474,7 +442,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -549,7 +517,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False From 4f79e3087edc2d59c0ed910d5fbe5dd90d53818d Mon Sep 17 00:00:00 2001 From: "Grace Huang (from Dev Box)" Date: Tue, 5 Mar 2024 11:25:21 -0500 Subject: [PATCH 2/6] fix documentation --- .../docs/New-AzSupportTicket.md | 67 ++++++++++++++----- .../New-AzSupportTicketsNoSubscription.md | 66 +++++++++++++----- .../examples/New-AzSupportTicket.md | 63 ++++++++++++----- .../New-AzSupportTicketsNoSubscription.md | 63 ++++++++++++----- 4 files changed, 194 insertions(+), 65 deletions(-) diff --git a/src/Support/Support.Autorest/docs/New-AzSupportTicket.md b/src/Support/Support.Autorest/docs/New-AzSupportTicket.md index 6003f3f7529a..5de64d50662e 100644 --- a/src/Support/Support.Autorest/docs/New-AzSupportTicket.md +++ b/src/Support/Support.Autorest/docs/New-AzSupportTicket.md @@ -44,27 +44,60 @@ The auxiliary token will be from the Cloud solution provider (CSP) partner tenan ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Creates support ticket at subscription level ```powershell -{{ Add code here }} +New-AzSupportTicket -Name "test12345678" -AdvancedDiagnosticConsent "no" -ContactDetailPrimaryEmailAddress "test@test.com" -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" ``` ```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} +AdvancedDiagnosticConsent : No +ContactDetailAdditionalEmailAddress : +ContactDetailCountry : USA +ContactDetailFirstName : test +ContactDetailLastName : test +ContactDetailPhoneNumber : +ContactDetailPreferredContactMethod : Email +ContactDetailPreferredSupportLanguage : en-US +ContactDetailPreferredTimeZone : Pacific Standard Time +ContactDetailPrimaryEmailAddress : test@test.com +CreatedDate : 2/22/2024 6:48:38 AM +Description : test ticket - please ignore and close +EnrollmentId : +FileWorkspaceName : 2402220010002574 +Id : /subscriptions/76cb77fa-8b17-4eab-9493-b65dace99813/providers/Microsoft.Su + pport/supportTickets/test12345678 +ModifiedDate : 2/22/2024 6:48:50 AM +Name : test12345678 +ProblemClassificationDisplayName : Add or update VAT, tax id, PO number or profile information +ProblemClassificationId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc + /problemClassifications/3ec1a070-f242-9ecf-5a7c-e1a88ce029ef +ProblemScopingQuestion : +ProblemStartTime : +QuotaTicketDetailQuotaChangeRequest : +QuotaTicketDetailQuotaChangeRequestSubType : +QuotaTicketDetailQuotaChangeRequestVersion : +Require24X7Response : False +ResourceGroupName : +SecondaryConsent : +ServiceDisplayName : Billing +ServiceId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc +ServiceLevelAgreementExpirationTime : 2/22/2024 10:00:00 PM +ServiceLevelAgreementSlaMinute : 480 +ServiceLevelAgreementStartTime : 2/22/2024 6:48:38 AM +Severity : Minimal +Status : Open +SupportEngineerEmailAddress : +SupportPlanDisplayName : Azure Support Plan - Internal +SupportPlanId : U291cmNlOkVBLFN1YnNjcmlwdGlvbklkOjc2Q0I3N0ZBLThCMTctNEVBQi05NDkzLUI2NURBQ0 + U5OTgxMyxPZmZlcklkOk1TLUFaUi0wMDE1UCxTb3ZlcmVpZ25DbG91ZDpQdWJsaWMs +SupportPlanType : Azure Internal +SupportTicketId : 2402220010002574 +TechnicalTicketDetailResourceId : +Title : test ticket - please ignore and close +Type : Microsoft.Support/supportTickets +``` + +Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription ## PARAMETERS diff --git a/src/Support/Support.Autorest/docs/New-AzSupportTicketsNoSubscription.md b/src/Support/Support.Autorest/docs/New-AzSupportTicketsNoSubscription.md index a7a2ee5397d3..06679b9f92c0 100644 --- a/src/Support/Support.Autorest/docs/New-AzSupportTicketsNoSubscription.md +++ b/src/Support/Support.Autorest/docs/New-AzSupportTicketsNoSubscription.md @@ -38,27 +38,59 @@ The Azure support engineer working on your ticket will reach out to you for cons ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Creates support ticket at tenant level ```powershell -{{ Add code here }} +New-AzSupportTicketsNoSubscription -SupportTicketName "test12345678" -AdvancedDiagnosticConsent "no" -ContactDetailPrimaryEmailAddress "test@test.com" -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" ``` ```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} +AdvancedDiagnosticConsent : No +ContactDetailAdditionalEmailAddress : +ContactDetailCountry : USA +ContactDetailFirstName : test +ContactDetailLastName : test +ContactDetailPhoneNumber : +ContactDetailPreferredContactMethod : Email +ContactDetailPreferredSupportLanguage : en-US +ContactDetailPreferredTimeZone : Pacific Standard Time +ContactDetailPrimaryEmailAddress : test@test.com +CreatedDate : 2/22/2024 6:51:11 AM +Description : test ticket - please ignore and close +EnrollmentId : +FileWorkspaceName : 2402220010002592 +Id : /providers/Microsoft.Support/supportTickets/test12345678 +ModifiedDate : 2/22/2024 6:51:28 AM +Name : test12345678 +ProblemClassificationDisplayName : Add or update VAT, tax id, PO number or profile information +ProblemClassificationId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc + /problemClassifications/3ec1a070-f242-9ecf-5a7c-e1a88ce029ef +ProblemScopingQuestion : +ProblemStartTime : +QuotaTicketDetailQuotaChangeRequest : +QuotaTicketDetailQuotaChangeRequestSubType : +QuotaTicketDetailQuotaChangeRequestVersion : +Require24X7Response : False +ResourceGroupName : +SecondaryConsent : +ServiceDisplayName : Billing +ServiceId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc +ServiceLevelAgreementExpirationTime : 2/22/2024 10:00:00 PM +ServiceLevelAgreementSlaMinute : 480 +ServiceLevelAgreementStartTime : 2/22/2024 6:51:11 AM +Severity : Minimal +Status : Open +SupportEngineerEmailAddress : +SupportPlanDisplayName : Basic support +SupportPlanId : U291cmNlOkZyZWUsRnJlZUlkOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwOS + w= +SupportPlanType : Basic +SupportTicketId : 2402220010002592 +TechnicalTicketDetailResourceId : +Title : test ticket - please ignore and close +Type : Microsoft.Support/supportTickets +``` + +Creates a new support ticket for Billing, and Subscription Management issues ## PARAMETERS diff --git a/src/Support/Support.Autorest/examples/New-AzSupportTicket.md b/src/Support/Support.Autorest/examples/New-AzSupportTicket.md index 0371f56c36d2..ea57026858c6 100644 --- a/src/Support/Support.Autorest/examples/New-AzSupportTicket.md +++ b/src/Support/Support.Autorest/examples/New-AzSupportTicket.md @@ -1,22 +1,55 @@ -### Example 1: {{ Add title here }} +### Example 1: Creates support ticket at subscription level ```powershell -{{ Add code here }} +New-AzSupportTicket -Name "test12345678" -AdvancedDiagnosticConsent "no" -ContactDetailPrimaryEmailAddress "test@test.com" -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" ``` ```output -{{ Add output here (remove the output block if the example doesn't have an output) }} +AdvancedDiagnosticConsent : No +ContactDetailAdditionalEmailAddress : +ContactDetailCountry : USA +ContactDetailFirstName : test +ContactDetailLastName : test +ContactDetailPhoneNumber : +ContactDetailPreferredContactMethod : Email +ContactDetailPreferredSupportLanguage : en-US +ContactDetailPreferredTimeZone : Pacific Standard Time +ContactDetailPrimaryEmailAddress : test@test.com +CreatedDate : 2/22/2024 6:48:38 AM +Description : test ticket - please ignore and close +EnrollmentId : +FileWorkspaceName : 2402220010002574 +Id : /subscriptions/76cb77fa-8b17-4eab-9493-b65dace99813/providers/Microsoft.Su + pport/supportTickets/test12345678 +ModifiedDate : 2/22/2024 6:48:50 AM +Name : test12345678 +ProblemClassificationDisplayName : Add or update VAT, tax id, PO number or profile information +ProblemClassificationId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc + /problemClassifications/3ec1a070-f242-9ecf-5a7c-e1a88ce029ef +ProblemScopingQuestion : +ProblemStartTime : +QuotaTicketDetailQuotaChangeRequest : +QuotaTicketDetailQuotaChangeRequestSubType : +QuotaTicketDetailQuotaChangeRequestVersion : +Require24X7Response : False +ResourceGroupName : +SecondaryConsent : +ServiceDisplayName : Billing +ServiceId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc +ServiceLevelAgreementExpirationTime : 2/22/2024 10:00:00 PM +ServiceLevelAgreementSlaMinute : 480 +ServiceLevelAgreementStartTime : 2/22/2024 6:48:38 AM +Severity : Minimal +Status : Open +SupportEngineerEmailAddress : +SupportPlanDisplayName : Azure Support Plan - Internal +SupportPlanId : U291cmNlOkVBLFN1YnNjcmlwdGlvbklkOjc2Q0I3N0ZBLThCMTctNEVBQi05NDkzLUI2NURBQ0 + U5OTgxMyxPZmZlcklkOk1TLUFaUi0wMDE1UCxTb3ZlcmVpZ25DbG91ZDpQdWJsaWMs +SupportPlanType : Azure Internal +SupportTicketId : 2402220010002574 +TechnicalTicketDetailResourceId : +Title : test ticket - please ignore and close +Type : Microsoft.Support/supportTickets ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} +Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription diff --git a/src/Support/Support.Autorest/examples/New-AzSupportTicketsNoSubscription.md b/src/Support/Support.Autorest/examples/New-AzSupportTicketsNoSubscription.md index 0371f56c36d2..7b6fc5eccc1b 100644 --- a/src/Support/Support.Autorest/examples/New-AzSupportTicketsNoSubscription.md +++ b/src/Support/Support.Autorest/examples/New-AzSupportTicketsNoSubscription.md @@ -1,22 +1,53 @@ -### Example 1: {{ Add title here }} +### Example 1: Creates support ticket at tenant level ```powershell -{{ Add code here }} +New-AzSupportTicketsNoSubscription -SupportTicketName "test12345678" -AdvancedDiagnosticConsent "no" -ContactDetailPrimaryEmailAddress "test@test.com" -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" ``` ```output -{{ Add output here (remove the output block if the example doesn't have an output) }} +AdvancedDiagnosticConsent : No +ContactDetailAdditionalEmailAddress : +ContactDetailCountry : USA +ContactDetailFirstName : test +ContactDetailLastName : test +ContactDetailPhoneNumber : +ContactDetailPreferredContactMethod : Email +ContactDetailPreferredSupportLanguage : en-US +ContactDetailPreferredTimeZone : Pacific Standard Time +ContactDetailPrimaryEmailAddress : test@test.com +CreatedDate : 2/22/2024 6:51:11 AM +Description : test ticket - please ignore and close +EnrollmentId : +FileWorkspaceName : 2402220010002592 +Id : /providers/Microsoft.Support/supportTickets/test12345678 +ModifiedDate : 2/22/2024 6:51:28 AM +Name : test12345678 +ProblemClassificationDisplayName : Add or update VAT, tax id, PO number or profile information +ProblemClassificationId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc + /problemClassifications/3ec1a070-f242-9ecf-5a7c-e1a88ce029ef +ProblemScopingQuestion : +ProblemStartTime : +QuotaTicketDetailQuotaChangeRequest : +QuotaTicketDetailQuotaChangeRequestSubType : +QuotaTicketDetailQuotaChangeRequestVersion : +Require24X7Response : False +ResourceGroupName : +SecondaryConsent : +ServiceDisplayName : Billing +ServiceId : /providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc +ServiceLevelAgreementExpirationTime : 2/22/2024 10:00:00 PM +ServiceLevelAgreementSlaMinute : 480 +ServiceLevelAgreementStartTime : 2/22/2024 6:51:11 AM +Severity : Minimal +Status : Open +SupportEngineerEmailAddress : +SupportPlanDisplayName : Basic support +SupportPlanId : U291cmNlOkZyZWUsRnJlZUlkOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwOS + w= +SupportPlanType : Basic +SupportTicketId : 2402220010002592 +TechnicalTicketDetailResourceId : +Title : test ticket - please ignore and close +Type : Microsoft.Support/supportTickets ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - +Creates a new support ticket for Billing, and Subscription Management issues From cc100ad810d6962d252c748c346e370ea287e812 Mon Sep 17 00:00:00 2001 From: "Grace Huang (from Dev Box)" Date: Tue, 5 Mar 2024 15:33:47 -0500 Subject: [PATCH 3/6] fix top query --- src/Support/Support.Autorest/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Support/Support.Autorest/README.md b/src/Support/Support.Autorest/README.md index 5cc871f74992..0de07eecbfa7 100644 --- a/src/Support/Support.Autorest/README.md +++ b/src/Support/Support.Autorest/README.md @@ -141,7 +141,18 @@ directive: - from: swagger-document where: $.definitions.SupportTicketDetails transform: $.required = ['properties'] - + - from: GetAzSupportTicket_List.cs + where: $ + transform: $ = $.replace("!String.IsNullOrEmpty(_nextLink)" ,"!String.IsNullOrEmpty(_nextLink) && this._top <= 0"); + - from: GetAzSupportTicketsNoSubscription_List.cs + where: $ + transform: $ = $.replace("!String.IsNullOrEmpty(_nextLink)" ,"!String.IsNullOrEmpty(_nextLink) && this._top <= 0"); + - from: GetAzSupportCommunication_List.cs + where: $ + transform: $ = $.replace("!String.IsNullOrEmpty(_nextLink)" ,"!String.IsNullOrEmpty(_nextLink) && this._top <= 0"); + - from: GetAzSupportTicketCommunicationsNoSubscription_List.cs + where: $ + transform: $ = $.replace("!String.IsNullOrEmpty(_nextLink)" ,"!String.IsNullOrEmpty(_nextLink) && this._top <= 0"); # Following are common directives which are normally required in all the RPs # 1. Remove the unexpanded parameter set # 2. For New-* cmdlets, ViaIdentity is not required From 8a00ab347c3f13a2fe0110b1f815e9320480d8d3 Mon Sep 17 00:00:00 2001 From: "Grace Huang (from Dev Box)" Date: Wed, 6 Mar 2024 14:57:04 -0500 Subject: [PATCH 4/6] add custom error handler --- ...ewAzSupportCommunication_CreateExpanded.cs | 17 ++++++++ ...unicationsNoSubscription_CreateExpanded.cs | 17 ++++++++ .../NewAzSupportTicket_CreateExpanded.cs | 17 ++++++++ ...ortTicketsNoSubscription_CreateExpanded.cs | 17 ++++++++ .../custom/csharp/RestErrorHandler.cs | 40 +++++++++++++++++++ .../UpdateAzSupportTicket_UpdateExpanded.cs | 17 ++++++++ ...SupportTicket_UpdateViaIdentityExpanded.cs | 17 ++++++++ ...ortTicketsNoSubscription_UpdateExpanded.cs | 17 ++++++++ ...oSubscription_UpdateViaIdentityExpanded.cs | 17 ++++++++ 9 files changed, 176 insertions(+) create mode 100644 src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunication_CreateExpanded.cs create mode 100644 src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunicationsNoSubscription_CreateExpanded.cs create mode 100644 src/Support/Support.Autorest/custom/csharp/NewAzSupportTicket_CreateExpanded.cs create mode 100644 src/Support/Support.Autorest/custom/csharp/NewAzSupportTicketsNoSubscription_CreateExpanded.cs create mode 100644 src/Support/Support.Autorest/custom/csharp/RestErrorHandler.cs create mode 100644 src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateExpanded.cs create mode 100644 src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateViaIdentityExpanded.cs create mode 100644 src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateExpanded.cs create mode 100644 src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded.cs diff --git a/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunication_CreateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunication_CreateExpanded.cs new file mode 100644 index 000000000000..dda7085345b7 --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunication_CreateExpanded.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + public partial class NewAzSupportCommunication_CreateExpanded + { + partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + this.WriteError(responseMessage, errorResponseTask, ref returnNow); + } + } +} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunicationsNoSubscription_CreateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunicationsNoSubscription_CreateExpanded.cs new file mode 100644 index 000000000000..6b79f6f1acbe --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunicationsNoSubscription_CreateExpanded.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + public partial class NewAzSupportCommunicationsNoSubscription_CreateExpanded + { + partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + this.WriteError(responseMessage, errorResponseTask, ref returnNow); + } + } +} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicket_CreateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicket_CreateExpanded.cs new file mode 100644 index 000000000000..1baf777cef5e --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicket_CreateExpanded.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + public partial class NewAzSupportTicket_CreateExpanded + { + partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + this.WriteError(responseMessage, errorResponseTask, ref returnNow); + } + } +} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicketsNoSubscription_CreateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicketsNoSubscription_CreateExpanded.cs new file mode 100644 index 000000000000..e126746b8815 --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicketsNoSubscription_CreateExpanded.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + public partial class NewAzSupportTicketsNoSubscription_CreateExpanded + { + partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + this.WriteError(responseMessage, errorResponseTask, ref returnNow); + } + } +} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/RestErrorHandler.cs b/src/Support/Support.Autorest/custom/csharp/RestErrorHandler.cs new file mode 100644 index 000000000000..a25dbdb76114 --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/RestErrorHandler.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Management.Automation; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + internal static class CmdletRestExtension + { + public static void WriteError(this Cmdlet cmdlet, HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + var errorResponse = errorResponseTask?.ConfigureAwait(false).GetAwaiter().GetResult(); + + if (errorResponse?.Detail != null && errorResponse?.Detail.Count > 0) + { + var errorDetails = errorResponse.Detail; + var errorDetailsString = ""; + + foreach (var errorDetail in errorDetails) + { + errorDetailsString += errorDetail.Message + " "; + } + + cmdlet.WriteError(new ErrorRecord(new System.Exception(), null, ErrorCategory.InvalidOperation, null) + { + ErrorDetails = new ErrorDetails(errorDetailsString) { RecommendedAction = string.Empty } + }); + + returnNow = Task.FromResult(true); + } + else + { + returnNow = Task.FromResult(false); + } + } + } +} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateExpanded.cs new file mode 100644 index 000000000000..998dfa6fc3f4 --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateExpanded.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + public partial class UpdateAzSupportTicket_UpdateExpanded + { + partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + this.WriteError(responseMessage, errorResponseTask, ref returnNow); + } + } +} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateViaIdentityExpanded.cs b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..d5ad29278b29 --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateViaIdentityExpanded.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + public partial class UpdateAzSupportTicket_UpdateViaIdentityExpanded + { + partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + this.WriteError(responseMessage, errorResponseTask, ref returnNow); + } + } +} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateExpanded.cs new file mode 100644 index 000000000000..bc3382b9f7b6 --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateExpanded.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + public partial class UpdateAzSupportTicketsNoSubscription_UpdateExpanded + { + partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + this.WriteError(responseMessage, errorResponseTask, ref returnNow); + } + } +} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded.cs b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..b8f3ca67f9bd --- /dev/null +++ b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets +{ + public partial class UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded + { + partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) + { + this.WriteError(responseMessage, errorResponseTask, ref returnNow); + } + } +} \ No newline at end of file From 962bda331c27c284bddad4afe1f556b53a85af2e Mon Sep 17 00:00:00 2001 From: "Grace Huang (from Dev Box)" Date: Wed, 6 Mar 2024 16:50:11 -0500 Subject: [PATCH 5/6] consolidate list and get communicationsnosubscription and chattranscriptsnosubscription --- src/Support/Support.Autorest/Az.Support.psd1 | 2 +- src/Support/Support.Autorest/README.md | 8 ++ .../Support.Autorest/docs/Az.Support.md | 11 -- ...-AzSupportChatTranscriptsNoSubscription.md | 10 +- ...t-AzSupportCommunicationsNoSubscription.md | 44 +++++- ...portTicketChatTranscriptsNoSubscription.md | 92 ------------ ...pportTicketCommunicationsNoSubscription.md | 136 ------------------ ...portTicketChatTranscriptsNoSubscription.md | 22 --- ...pportTicketCommunicationsNoSubscription.md | 22 --- 9 files changed, 59 insertions(+), 288 deletions(-) delete mode 100644 src/Support/Support.Autorest/docs/Get-AzSupportTicketChatTranscriptsNoSubscription.md delete mode 100644 src/Support/Support.Autorest/docs/Get-AzSupportTicketCommunicationsNoSubscription.md delete mode 100644 src/Support/Support.Autorest/examples/Get-AzSupportTicketChatTranscriptsNoSubscription.md delete mode 100644 src/Support/Support.Autorest/examples/Get-AzSupportTicketCommunicationsNoSubscription.md diff --git a/src/Support/Support.Autorest/Az.Support.psd1 b/src/Support/Support.Autorest/Az.Support.psd1 index 198161a20fd5..a1992c5ee0d2 100644 --- a/src/Support/Support.Autorest/Az.Support.psd1 +++ b/src/Support/Support.Autorest/Az.Support.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Support.private.dll' FormatsToProcess = './Az.Support.format.ps1xml' - 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' + 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-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' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Support' diff --git a/src/Support/Support.Autorest/README.md b/src/Support/Support.Autorest/README.md index 0de07eecbfa7..745ca6ec2037 100644 --- a/src/Support/Support.Autorest/README.md +++ b/src/Support/Support.Autorest/README.md @@ -141,6 +141,14 @@ directive: - from: swagger-document where: $.definitions.SupportTicketDetails transform: $.required = ['properties'] + - from: swagger-document + where: $.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/chatTranscripts"].get.operationId + transform: >- + return "ChatTranscriptsNoSubscription_List" + - from: swagger-document + where: $.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications"].get.operationId + transform: >- + return "CommunicationsNoSubscription_List" - from: GetAzSupportTicket_List.cs where: $ transform: $ = $.replace("!String.IsNullOrEmpty(_nextLink)" ,"!String.IsNullOrEmpty(_nextLink) && this._top <= 0"); diff --git a/src/Support/Support.Autorest/docs/Az.Support.md b/src/Support/Support.Autorest/docs/Az.Support.md index 870e31483dc2..0bcfafb640b2 100644 --- a/src/Support/Support.Autorest/docs/Az.Support.md +++ b/src/Support/Support.Autorest/docs/Az.Support.md @@ -49,17 +49,6 @@ Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error. -### [Get-AzSupportTicketChatTranscriptsNoSubscription](Get-AzSupportTicketChatTranscriptsNoSubscription.md) -Lists all chat transcripts for a support ticket - -### [Get-AzSupportTicketCommunicationsNoSubscription](Get-AzSupportTicketCommunicationsNoSubscription.md) -Lists all communications (attachments not included) for a support ticket. -\
\ You can also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the $filter parameter. -The only type of communication supported today is _Web_. -Output will be a paged result with _nextLink_, using which you can retrieve the next set of Communication results. -\
\
Support ticket data is available for 18 months after ticket creation. -If a ticket was created more than 18 months ago, a request for data might cause an error. - ### [Get-AzSupportTicketsNoSubscription](Get-AzSupportTicketsNoSubscription.md) Gets details for a specific support ticket. Support ticket data is available for 18 months after ticket creation. diff --git a/src/Support/Support.Autorest/docs/Get-AzSupportChatTranscriptsNoSubscription.md b/src/Support/Support.Autorest/docs/Get-AzSupportChatTranscriptsNoSubscription.md index f302ca238726..3e1cb5b11092 100644 --- a/src/Support/Support.Autorest/docs/Get-AzSupportChatTranscriptsNoSubscription.md +++ b/src/Support/Support.Autorest/docs/Get-AzSupportChatTranscriptsNoSubscription.md @@ -12,7 +12,13 @@ Returns chatTranscript details for a no subscription support ticket. ## SYNTAX -### Get (Default) +### List (Default) +``` +Get-AzSupportChatTranscriptsNoSubscription -SupportTicketName [-DefaultProfile ] + [] +``` + +### Get ``` Get-AzSupportChatTranscriptsNoSubscription -ChatTranscriptName -SupportTicketName [-DefaultProfile ] [] @@ -127,7 +133,7 @@ Support ticket name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, List Aliases: Required: True diff --git a/src/Support/Support.Autorest/docs/Get-AzSupportCommunicationsNoSubscription.md b/src/Support/Support.Autorest/docs/Get-AzSupportCommunicationsNoSubscription.md index d2893ca78b85..aec070226d3a 100644 --- a/src/Support/Support.Autorest/docs/Get-AzSupportCommunicationsNoSubscription.md +++ b/src/Support/Support.Autorest/docs/Get-AzSupportCommunicationsNoSubscription.md @@ -12,7 +12,13 @@ Returns communication details for a support ticket. ## SYNTAX -### Get (Default) +### List (Default) +``` +Get-AzSupportCommunicationsNoSubscription -SupportTicketName [-Filter ] [-Top ] + [-DefaultProfile ] [] +``` + +### Get ``` Get-AzSupportCommunicationsNoSubscription -CommunicationName -SupportTicketName [-DefaultProfile ] [] @@ -90,6 +96,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Filter +The filter to apply on the operation. +You can filter by communicationType and createdDate properties. +CommunicationType supports Equals ('eq') operator and createdDate supports Greater Than ('gt') and Greater Than or Equals ('ge') operators. +You may combine the CommunicationType and CreatedDate filters by Logical And ('and') operator. + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -InputObject Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. @@ -127,7 +151,7 @@ Support ticket name. ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, List Aliases: Required: True @@ -137,6 +161,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Top +The number of values to return in the collection. +Default is 10 and max is 10. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters 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). diff --git a/src/Support/Support.Autorest/docs/Get-AzSupportTicketChatTranscriptsNoSubscription.md b/src/Support/Support.Autorest/docs/Get-AzSupportTicketChatTranscriptsNoSubscription.md deleted file mode 100644 index 9ccf242ecaa1..000000000000 --- a/src/Support/Support.Autorest/docs/Get-AzSupportTicketChatTranscriptsNoSubscription.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -external help file: -Module Name: Az.Support -online version: https://learn.microsoft.com/powershell/module/az.support/get-azsupportticketchattranscriptsnosubscription -schema: 2.0.0 ---- - -# Get-AzSupportTicketChatTranscriptsNoSubscription - -## SYNOPSIS -Lists all chat transcripts for a support ticket - -## SYNTAX - -``` -Get-AzSupportTicketChatTranscriptsNoSubscription -SupportTicketName [-DefaultProfile ] - [] -``` - -## DESCRIPTION -Lists all chat transcripts for a support ticket - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SupportTicketName -Support ticket name - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -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). - -## INPUTS - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Support.Models.IChatTranscriptDetails - -## NOTES - -## RELATED LINKS - diff --git a/src/Support/Support.Autorest/docs/Get-AzSupportTicketCommunicationsNoSubscription.md b/src/Support/Support.Autorest/docs/Get-AzSupportTicketCommunicationsNoSubscription.md deleted file mode 100644 index b4670eeb486d..000000000000 --- a/src/Support/Support.Autorest/docs/Get-AzSupportTicketCommunicationsNoSubscription.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -external help file: -Module Name: Az.Support -online version: https://learn.microsoft.com/powershell/module/az.support/get-azsupportticketcommunicationsnosubscription -schema: 2.0.0 ---- - -# Get-AzSupportTicketCommunicationsNoSubscription - -## SYNOPSIS -Lists all communications (attachments not included) for a support ticket. -\
\ You can also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the $filter parameter. -The only type of communication supported today is _Web_. -Output will be a paged result with _nextLink_, using which you can retrieve the next set of Communication results. -\
\
Support ticket data is available for 18 months after ticket creation. -If a ticket was created more than 18 months ago, a request for data might cause an error. - -## SYNTAX - -``` -Get-AzSupportTicketCommunicationsNoSubscription -SupportTicketName [-Filter ] [-Top ] - [-DefaultProfile ] [] -``` - -## DESCRIPTION -Lists all communications (attachments not included) for a support ticket. -\
\ You can also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the $filter parameter. -The only type of communication supported today is _Web_. -Output will be a paged result with _nextLink_, using which you can retrieve the next set of Communication results. -\
\
Support ticket data is available for 18 months after ticket creation. -If a ticket was created more than 18 months ago, a request for data might cause an error. - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter -The filter to apply on the operation. -You can filter by communicationType and createdDate properties. -CommunicationType supports Equals ('eq') operator and createdDate supports Greater Than ('gt') and Greater Than or Equals ('ge') operators. -You may combine the CommunicationType and CreatedDate filters by Logical And ('and') operator. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SupportTicketName -Support ticket name - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top -The number of values to return in the collection. -Default is 10 and max is 10. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -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). - -## INPUTS - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Support.Models.ICommunicationDetails - -## NOTES - -## RELATED LINKS - diff --git a/src/Support/Support.Autorest/examples/Get-AzSupportTicketChatTranscriptsNoSubscription.md b/src/Support/Support.Autorest/examples/Get-AzSupportTicketChatTranscriptsNoSubscription.md deleted file mode 100644 index 0371f56c36d2..000000000000 --- a/src/Support/Support.Autorest/examples/Get-AzSupportTicketChatTranscriptsNoSubscription.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - diff --git a/src/Support/Support.Autorest/examples/Get-AzSupportTicketCommunicationsNoSubscription.md b/src/Support/Support.Autorest/examples/Get-AzSupportTicketCommunicationsNoSubscription.md deleted file mode 100644 index 0371f56c36d2..000000000000 --- a/src/Support/Support.Autorest/examples/Get-AzSupportTicketCommunicationsNoSubscription.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here (remove the output block if the example doesn't have an output) }} -``` - -{{ Add description here }} - From ef100cc2f73a0910addde761997cbb7c4e344703 Mon Sep 17 00:00:00 2001 From: "Grace Huang (from Dev Box)" Date: Thu, 7 Mar 2024 14:46:52 -0500 Subject: [PATCH 6/6] remove custom error handler csharp --- ...ewAzSupportCommunication_CreateExpanded.cs | 17 -------- ...unicationsNoSubscription_CreateExpanded.cs | 17 -------- .../NewAzSupportTicket_CreateExpanded.cs | 17 -------- ...ortTicketsNoSubscription_CreateExpanded.cs | 17 -------- .../custom/csharp/RestErrorHandler.cs | 40 ------------------- .../UpdateAzSupportTicket_UpdateExpanded.cs | 17 -------- ...SupportTicket_UpdateViaIdentityExpanded.cs | 17 -------- ...ortTicketsNoSubscription_UpdateExpanded.cs | 17 -------- ...oSubscription_UpdateViaIdentityExpanded.cs | 17 -------- 9 files changed, 176 deletions(-) delete mode 100644 src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunication_CreateExpanded.cs delete mode 100644 src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunicationsNoSubscription_CreateExpanded.cs delete mode 100644 src/Support/Support.Autorest/custom/csharp/NewAzSupportTicket_CreateExpanded.cs delete mode 100644 src/Support/Support.Autorest/custom/csharp/NewAzSupportTicketsNoSubscription_CreateExpanded.cs delete mode 100644 src/Support/Support.Autorest/custom/csharp/RestErrorHandler.cs delete mode 100644 src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateExpanded.cs delete mode 100644 src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateViaIdentityExpanded.cs delete mode 100644 src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateExpanded.cs delete mode 100644 src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded.cs diff --git a/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunication_CreateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunication_CreateExpanded.cs deleted file mode 100644 index dda7085345b7..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunication_CreateExpanded.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - public partial class NewAzSupportCommunication_CreateExpanded - { - partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - this.WriteError(responseMessage, errorResponseTask, ref returnNow); - } - } -} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunicationsNoSubscription_CreateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunicationsNoSubscription_CreateExpanded.cs deleted file mode 100644 index 6b79f6f1acbe..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/NewAzSupportCommunicationsNoSubscription_CreateExpanded.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - public partial class NewAzSupportCommunicationsNoSubscription_CreateExpanded - { - partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - this.WriteError(responseMessage, errorResponseTask, ref returnNow); - } - } -} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicket_CreateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicket_CreateExpanded.cs deleted file mode 100644 index 1baf777cef5e..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicket_CreateExpanded.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - public partial class NewAzSupportTicket_CreateExpanded - { - partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - this.WriteError(responseMessage, errorResponseTask, ref returnNow); - } - } -} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicketsNoSubscription_CreateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicketsNoSubscription_CreateExpanded.cs deleted file mode 100644 index e126746b8815..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/NewAzSupportTicketsNoSubscription_CreateExpanded.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - public partial class NewAzSupportTicketsNoSubscription_CreateExpanded - { - partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - this.WriteError(responseMessage, errorResponseTask, ref returnNow); - } - } -} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/RestErrorHandler.cs b/src/Support/Support.Autorest/custom/csharp/RestErrorHandler.cs deleted file mode 100644 index a25dbdb76114..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/RestErrorHandler.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Management.Automation; -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - internal static class CmdletRestExtension - { - public static void WriteError(this Cmdlet cmdlet, HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - var errorResponse = errorResponseTask?.ConfigureAwait(false).GetAwaiter().GetResult(); - - if (errorResponse?.Detail != null && errorResponse?.Detail.Count > 0) - { - var errorDetails = errorResponse.Detail; - var errorDetailsString = ""; - - foreach (var errorDetail in errorDetails) - { - errorDetailsString += errorDetail.Message + " "; - } - - cmdlet.WriteError(new ErrorRecord(new System.Exception(), null, ErrorCategory.InvalidOperation, null) - { - ErrorDetails = new ErrorDetails(errorDetailsString) { RecommendedAction = string.Empty } - }); - - returnNow = Task.FromResult(true); - } - else - { - returnNow = Task.FromResult(false); - } - } - } -} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateExpanded.cs deleted file mode 100644 index 998dfa6fc3f4..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateExpanded.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - public partial class UpdateAzSupportTicket_UpdateExpanded - { - partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - this.WriteError(responseMessage, errorResponseTask, ref returnNow); - } - } -} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateViaIdentityExpanded.cs b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateViaIdentityExpanded.cs deleted file mode 100644 index d5ad29278b29..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicket_UpdateViaIdentityExpanded.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - public partial class UpdateAzSupportTicket_UpdateViaIdentityExpanded - { - partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - this.WriteError(responseMessage, errorResponseTask, ref returnNow); - } - } -} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateExpanded.cs b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateExpanded.cs deleted file mode 100644 index bc3382b9f7b6..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateExpanded.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - public partial class UpdateAzSupportTicketsNoSubscription_UpdateExpanded - { - partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - this.WriteError(responseMessage, errorResponseTask, ref returnNow); - } - } -} \ No newline at end of file diff --git a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded.cs b/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded.cs deleted file mode 100644 index b8f3ca67f9bd..000000000000 --- a/src/Support/Support.Autorest/custom/csharp/UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Azure.PowerShell.Cmdlets.Support.Models; - -namespace Microsoft.Azure.PowerShell.Cmdlets.Support.Cmdlets -{ - public partial class UpdateAzSupportTicketsNoSubscription_UpdateViaIdentityExpanded - { - partial void overrideOnDefault(HttpResponseMessage responseMessage, Task errorResponseTask, ref Task returnNow) - { - this.WriteError(responseMessage, errorResponseTask, ref returnNow); - } - } -} \ No newline at end of file