Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update table formatting, parameter aliasing, documentation #8

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion src/Support/Support.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,48 @@ directive:
- ChunkSize
- FileSize
- NumberOfChunks
- where:
model-name: SupportTicketDetails
set:
format-table:
properties:
- Name
- Title
- SupportTicketId
- Severity
- ServiceDisplayName
- CreatedDate
- where:
model-name: CommunicationDetails
set:
format-table:
properties:
- Name
- Sender
- Subject
- CreatedDate
- where:
model-name: ChatTranscriptDetails
set:
format-table:
properties:
- Name
- StartTime
- where:
subject: CommunicationsNoSubscription
parameter-name: CommunicationName
set:
alias: Name
- where:
subject: SupportTicketsNoSubscription
parameter-name: SupportTicketName
set:
alias: Name
- where:
subject: ChatTranscriptsNoSubscription
parameter-name: ChatTranscriptName
set:
alias: Name
- where:
subject: UploadFile
parameter-name: FileWorkspaceName
Expand Down Expand Up @@ -141,6 +183,11 @@ directive:
- from: swagger-document
where: $.definitions.SupportTicketDetails
transform: $.required = ['properties']
# only needed for 2022 preview version, should be able to remove for GA
- from: swagger-document
where: $.definitions.SupportTicketDetailsProperties
transform: $.required = ['serviceId','title','description','problemClassificationId','severity','contactDetails', 'advancedDiagnosticConsent']

- from: swagger-document
where: $.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/chatTranscripts"].get.operationId
transform: >-
Expand All @@ -158,7 +205,7 @@ directive:
- from: GetAzSupportCommunication_List.cs
where: $
transform: $ = $.replace("!String.IsNullOrEmpty(_nextLink)" ,"!String.IsNullOrEmpty(_nextLink) && this._top <= 0");
- from: GetAzSupportTicketCommunicationsNoSubscription_List.cs
- from: GetAzSupportCommunicationsNoSubscription_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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ Returns chatTranscript details for a support ticket under a subscription.
```

```output
Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModi
fiedAt
---- ------------------- ------------------- ----------------------- ------------------
595df7b4-167f-4f3e-8292-f0ba2b8a53f9
f8b45cd6-a8ec-40e2-b846-a28b848553cf
Name StartTime
---- ---------
595df7b4-167f-4f3e-8292-f0ba2b8a53f9 8/11/2023 7:27:49 PM
f8b45cd6-a8ec-40e2-b846-a28b848553cf 8/11/2023 7:52:44 PM
```

Lists all chat transcripts for a support ticket under subscription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,67 @@ Returns chatTranscript details for a no subscription support ticket.

## EXAMPLES

### Example 1: {{ Add title here }}
### Example 1: List chat transcripts under a no subscription support ticket
```powershell
{{ Add code here }}
Get-AzSupportChatTranscriptsNoSubscription -SupportTicketName test12345
```

```output
{{ Add output here (remove the output block if the example doesn't have an output) }}
Name StartTime
---- ---------
595df7b4-167f-4f3e-8292-f0ba2b8a53f9 8/11/2023 7:27:49 PM
f8b45cd6-a8ec-40e2-b846-a28b848553cf 8/11/2023 7:52:44 PM
```

{{ Add description here }}
List chat transcripts under a no subscription support ticket

### Example 2: {{ Add title here }}
### Example 2: Get details of a chat transcript under a no subscription support ticket
```powershell
{{ Add code here }}
Get-AzSupportChatTranscriptsNoSubscription -SupportTicketName test12345 -Name 595df7b4-167f-4f3e-8292-f0ba2b8a53f9
```

```output
{{ Add output here (remove the output block if the example doesn't have an output) }}
```

{{ Add description here }}
Id : /providers/Microsoft.Support/supportT
ickets/58cf91d7-bedfb285-617ecf73-d627-4bfd-9298-5950da2170b7/chatTranscripts/595df7b4-1
67f-4f3e-8292-f0ba2b8a53f9
Message : {{
"contentType": "text",
"communicationDirection": "Inbound",
"sender": "",
"body": "Hey",
"createdDate": "2023-08-11T19:19:33.0000000Z"
}, {
"contentType": "text",
"communicationDirection": "Outbound",
"sender": "Aditi Takle",
"body": "hi",
"createdDate": "2023-08-11T19:19:38.0000000Z"
}, {
"contentType": "text",
"communicationDirection": "Outbound",
"sender": "Damian Spoltore",
"body": "hi Aditi, I\u0027m Damian",
"createdDate": "2023-08-11T19:24:19.0000000Z"
}, {
"contentType": "text",
"communicationDirection": "Outbound",
"sender": "Damian Spoltore",
"body": "I was entering to test",
"createdDate": "2023-08-11T19:24:24.0000000Z"
}}
Name : 595df7b4-167f-4f3e-8292-f0ba2b8a53f9
ResourceGroupName :
StartTime : 8/11/2023 7:27:49 PM
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Support/chatTranscripts
```

Get details of a chat transcript under a no subscription support ticket

## PARAMETERS

Expand All @@ -71,7 +111,7 @@ ChatTranscript name.
```yaml
Type: System.String
Parameter Sets: Get, GetViaIdentitySupportTicket
Aliases:
Aliases: Name

Required: True
Position: Named
Expand Down
13 changes: 4 additions & 9 deletions src/Support/Support.Autorest/docs/Get-AzSupportCommunication.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,10 @@ Returns communication details for a support ticket.
```

```output
Name ResourceGroupName
---- -----------------
9079281d-0fcc-ee11-9079-6045bdef78de
test123
9ffd523a-5acb-ee11-9079-6045bdef7a0a
590629b9-44cb-ee11-9079-6045bdef700d
8a03e5d5-8eca-ee11-9079-6045bdeb5f9a
14696079-8eca-ee11-9079-6045bdeb5f9a
e0d2b429-7bca-ee11-907a-0022482a4908
Name Sender Subject CreatedDate
---- ------ ------- -----------
590629b9-44cb-ee11-9079-6045bdef700d [email protected] test - TrackingID#2403080040012292 3/9/2024 2:21:58 AM
ee25b14e-8fdd-ee11-904d-0022482a4908 [email protected] … 3/8/2024 9:03:35 PM
```

Lists all communications (attachments not included) for a support ticket.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,40 @@ Returns communication details for a support ticket.

## EXAMPLES

### Example 1: {{ Add title here }}
### Example 1: List all communications under a no subscription support ticket
```powershell
{{ Add code here }}
Get-AzSupportCommunicationsNoSubscription -SupportTicketName test1234
```

```output
{{ Add output here (remove the output block if the example doesn't have an output) }}
Name Sender Subject CreatedDate
---- ------ ------- -----------
testCommunication1 [email protected] this is a test subject - TrackingID#2403070040015890 3/11/2024 3:46:43 PM
testCommunication2 [email protected] this is a test subject - TrackingID#2403070040015890 3/11/2024 3:46:43 PM
```

{{ Add description here }}
List all communications under a no subscription support ticket

### Example 2: {{ Add title here }}
### Example 2: Get a communication under a no subscription support ticket
```powershell
{{ Add code here }}
Get-AzSupportCommunicationsNoSubscription -SupportTicketName test1234 -Name testCommunication1

```

```output
{{ Add output here (remove the output block if the example doesn't have an output) }}
Body : <pre>this is a test body</pre>
CommunicationDirection : Inbound
CommunicationType : Web
CreatedDate : 3/7/2024 11:53:33 PM
Id : /providers/Microsoft.Support/supportTickets/test1234/communications/testCommunication1
Name : testCommunication
ResourceGroupName :
Sender : [email protected]
Subject : this is a test subject - TrackingID#2403070040015890
Type : Microsoft.Support/communications
```

{{ Add description here }}
Get a communication under a no subscription support ticket

## PARAMETERS

Expand All @@ -71,7 +84,7 @@ Communication name.
```yaml
Type: System.String
Parameter Sets: Get, GetViaIdentitySupportTicket
Aliases:
Aliases: Name

Required: True
Position: Named
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Lists all the available Microsoft Support REST API operations.

## EXAMPLES

### Example 1: {{ Add title here }}
### Example 1: List Azure Support operations
```powershell
Get-AzSupportOperation
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ Get-AzSupportProblemClassification -ServiceName "6f16735c-b0ae-b275-ad3a-03479cf
```

```output
DisplayName Name SecondaryConsentEnabled
----------- ---- -----------------------
Compute-VM (cores-vCPUs) subscription limit increases 4d78b174-3203-a3ac-9e08-41fb35de6354
Windows Update, Guest Patching and OS Upgrades / Issue with Azure Automatic VM guest patching e565bd13-86f0-ecb3-d2b7-0a7501ae8839
Windows Update, Guest Patching and OS Upgrades / Issue with Azure Update Management patching 8d686480-ef41-5005-358e-12b9be9608fe
DisplayName Name SecondaryConsentEnabled
----------- ---- -----------------------
Compute-VM (cores-vCPUs) subscription limit increases 4d78b174-3203-a3ac-9e08-41fb35de6354
Windows Update, Guest Patching and OS Upgrades / Issue with Azure Automatic VM guest patching e565bd13-86f0-ecb3-d2b7-0a7501ae8839
Windows Update, Guest Patching and OS Upgrades / Issue with Azure Update Management patching 8d686480-ef41-5005-358e-12b9be9608fe
```

Lists all the problem classifications (categories) available for a specific Azure service.
Expand Down
13 changes: 5 additions & 8 deletions src/Support/Support.Autorest/docs/Get-AzSupportTicket.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,14 @@ If a ticket was created more than 18 months ago, a request for data might cause

### Example 1: Get list of support tickets at subscription level
```powershell
Get-AzSupportTicket -Filter "CreatedDate ge 2024-02-21"
Get-AzSupportTicket
```

```output
Name ResourceGroupName
---- -----------------
test1-5dda17d0-a60d-4f4c-82e3-0fe3604c0ed4
test-5dda17d0-a60d-4f4c-82e3-0fe3604c0ed4
test1-8fd280ac-966b-41da-b6f5-ad630c784feb
test-8fd280ac-966b-41da-b6f5-ad630c784feb
test1-a31f113b-8f99-4a8d-8016-33aec8165a20
Name Title SupportTicketId Severity ServiceDisplayName CreatedDate
---- ----- --------------- -------- ------------------ -----------
517f2da6-9bc71cda-278fc71b-7b86-4289-baec-922e8be1a04a test 2403080040012292 Minimal Billing 3/8/2024 9:03:26 PM
test1-5dda17d0-a60d-4f4c-82e3-0fe3604c0ed4 test ticket - please ignore and close 2403060040007460 Minimal Billing 3/6/2024 3:09:28 PM

Lists all the support tickets for an Azure subscription

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,13 @@ If a ticket was created more than 18 months ago, a request for data might cause
```

```output
Name ResourceGroupName
---- -----------------
test1-5dda17d0-a60d-4f4c-82e3-0fe3604c0ed4
test-5dda17d0-a60d-4f4c-82e3-0fe3604c0ed4
test1-8fd280ac-966b-41da-b6f5-ad630c784feb
test-8fd280ac-966b-41da-b6f5-ad630c784feb
test1-a31f113b-8f99-4a8d-8016-33aec8165a20
test-a31f113b-8f99-4a8d-8016-33aec8165a20
test1-9fbdfed4-20e5-47ee-b36e-455ca16bb46b
test-9fbdfed4-20e5-47ee-b36e-455ca16bb46b
test-1c0ad9a1-f2fb-44a7-b776-7400e0b286a8
Name Title SupportTicketId Severity ServiceDisplayName CreatedDate
---- ----- --------------- -------- ------------------ -----------
2403110040009092 test ticket please ignore and close 2403110040009092 Minimal Billing 3/11/2024 3:46:20 PM
test-41b4ec72-8634-4e03-978e-15bde625be00 test ticket - please ignore and close 2403070040010395 Minimal Billing 3/7/2024 5:35:55 PM
test-270a8ba4-7083-4b02-8b32-b5c2cdc55e78 test ticket - please ignore and close 2403070040010346 Minimal Billing 3/7/2024 5:32:40 PM
test-8dad4b97-5ff5-4a1e-bb6e-d323348db3f2 test ticket - please ignore and close 2403070040009816 Minimal Billing 3/7/2024 5:04:36 PM
test-0d8ee1f2-89d6-4078-8c1a-5845673966a1 test ticket - please ignore and close 2403070040009769 Minimal Billing 3/7/2024 5:02:44 PM
```

Lists all the support tickets.
Expand Down Expand Up @@ -113,7 +109,7 @@ Title : test ticket - please ignore and clo
Type : Microsoft.Support/supportTickets
```

Lists all the support tickets
Gets details of a support ticket

## PARAMETERS

Expand Down Expand Up @@ -174,7 +170,7 @@ Support ticket name.
```yaml
Type: System.String
Parameter Sets: Get
Aliases:
Aliases: Name

Required: True
Position: Named
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,26 @@ Adds a new customer communication to an Azure support ticket.

## EXAMPLES

### Example 1: {{ Add title here }}
### Example 1: Create a new communication under a no subscription ticket
```powershell
{{ Add code here }}
New-AzSupportCommunicationsNoSubscription -SupportTicketName test1234 -Name testCommunication2 -Subject test -Body test
```

```output
{{ Add output here (remove the output block if the example doesn't have an output) }}
Body : <pre>test</pre>
CommunicationDirection : Inbound
CommunicationType : Web
CreatedDate : 3/11/2024 2:21:32 PM
Id : /providers/Microsoft.Support/supportTickets/test-7d6ad184-eb1d-40b1-ae43-5b4312b702d4/communications/33445ea3-b
2df-ee11-904d-00224835ac0b
Name : 33445ea3-b2df-ee11-904d-00224835ac0b
ResourceGroupName :
Sender : [email protected]
Subject : test - TrackingID#2403070040015890
Type : Microsoft.Support/communications
```

{{ 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 }}
Create a new communication under a no subscription ticket

## PARAMETERS

Expand Down Expand Up @@ -83,7 +82,7 @@ Communication name.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Aliases: Name

Required: True
Position: Named
Expand Down
Loading