Skip to content

Commit

Permalink
combined cmdlets
Browse files Browse the repository at this point in the history
  • Loading branch information
grhuangmsft committed Jan 19, 2024
1 parent 07ace3d commit 69b3443
Show file tree
Hide file tree
Showing 57 changed files with 595 additions and 4,232 deletions.
2 changes: 1 addition & 1 deletion src/Support/Support.Autorest/Az.Support.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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-AzSupportProblemClassification', 'Get-AzSupportService', 'Get-AzSupportTicket', 'Get-AzSupportTicketChatTranscriptsNoSubscription', 'Get-AzSupportTicketCommunicationsNoSubscription', 'Get-AzSupportTicketsNoSubscription', 'Invoke-AzSupportUploadFile', 'Invoke-AzSupportUploadFilesNoSubscription', 'New-AzSupportCommunication', 'New-AzSupportCommunicationsNoSubscription', 'New-AzSupportFile', 'New-AzSupportFileAndUpload', 'New-AzSupportFilesNoSubscription', 'New-AzSupportFileWorkspace', 'New-AzSupportFileWorkspacesNoSubscription', 'New-AzSupportTicket', 'New-AzSupportTicketsNoSubscription', 'Test-AzSupportCommunicationNameAvailability', 'Test-AzSupportCommunicationsNoSubscriptionNameAvailability', 'Test-AzSupportTicketNameAvailability', 'Test-AzSupportTicketsNoSubscriptionNameAvailability', 'Update-AzSupportCommunication', 'Update-AzSupportCommunicationsNoSubscription', 'Update-AzSupportFile', 'Update-AzSupportFilesNoSubscription', 'Update-AzSupportTicket', 'Update-AzSupportTicketsNoSubscription'
FunctionsToExport = 'Get-AzSupportChatTranscript', 'Get-AzSupportCommunication', 'Get-AzSupportFile', 'Get-AzSupportFileWorkspace', 'Get-AzSupportProblemClassification', 'Get-AzSupportService', 'Get-AzSupportTicket', 'Get-AzSupportTicketChatTranscript', 'Get-AzSupportTicketCommunication', 'Invoke-AzSupportUploadFile', 'New-AzSupportCommunication', 'New-AzSupportFile', 'New-AzSupportFileAndUpload', 'New-AzSupportFileWorkspace', 'New-AzSupportTicket', 'Test-AzSupportCommunicationNameAvailability', 'Test-AzSupportTicketNameAvailability', 'Update-AzSupportCommunication', 'Update-AzSupportFile', 'Update-AzSupportTicket'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Support'
Expand Down
142 changes: 71 additions & 71 deletions src/Support/Support.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,78 +56,78 @@ subject-prefix: $(service-name)

directive:
# Remove the default value of subscriptionId
# - from: source-file-csharp
# where: $
# transform: $ = $.replace(' [Microsoft.Azure.PowerShell.Cmdlets.Support.Runtime.DefaultInfo(\n Name = @"",\n Description =@"",\n Script = @"(Get-AzContext).Subscription.Id",\n SetCondition = @"")]\n', '')
- from: source-file-csharp
where: $
transform: $ = $.replace(' [Microsoft.Azure.PowerShell.Cmdlets.Support.Runtime.DefaultInfo(\n Name = @"",\n Description =@"",\n Script = @"(Get-AzContext).Subscription.Id",\n SetCondition = @"")]\n', '')
# Rename the operation ids of NoSubscription to make them can be combined automatically
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/checkNameAvailability"].post'
# transform: >
# $["operationId"] = "SupportTickets_CheckNameAvailabilityWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets"].get'
# transform: >
# $["operationId"] = "SupportTickets_ListWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}"].get'
# transform: >
# $["operationId"] = "SupportTickets_GetWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}"].patch'
# transform: >
# $["operationId"] = "SupportTickets_UpdateWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}"].put'
# transform: >
# $["operationId"] = "SupportTickets_CreateWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/checkNameAvailability"].post'
# transform: >
# $["operationId"] = "Communications_CheckNameAvailabilityWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications"].get'
# transform: >
# $["operationId"] = "SupportTicketCommunications_ListWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}"].get'
# transform: >
# $["operationId"] = "Communications_GetWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}"].put'
# transform: >
# $["operationId"] = "Communications_CreateWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/chatTranscripts"].get'
# transform: >
# $["operationId"] = "SupportTicketChatTranscripts_ListWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/chatTranscripts/{chatTranscriptName}"].get'
# transform: >
# $["operationId"] = "ChatTranscripts_GetWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}"].get'
# transform: >
# $["operationId"] = "FileWorkspaces_GetWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}"].put'
# transform: >
# $["operationId"] = "FileWorkspaces_CreateWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files"].get'
# transform: >
# $["operationId"] = "Files_ListWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}"].get'
# transform: >
# $["operationId"] = "Files_GetWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}"].put'
# transform: >
# $["operationId"] = "Files_CreateWithNoSubscriptionId";
# - from: swagger-document
# where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}/upload"].post'
# transform: >
# $["operationId"] = "Files_UploadWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/checkNameAvailability"].post'
transform: >
$["operationId"] = "SupportTickets_CheckNameAvailabilityWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets"].get'
transform: >
$["operationId"] = "SupportTickets_ListWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}"].get'
transform: >
$["operationId"] = "SupportTickets_GetWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}"].patch'
transform: >
$["operationId"] = "SupportTickets_UpdateWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}"].put'
transform: >
$["operationId"] = "SupportTickets_CreateWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/checkNameAvailability"].post'
transform: >
$["operationId"] = "Communications_CheckNameAvailabilityWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications"].get'
transform: >
$["operationId"] = "SupportTicketCommunications_ListWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}"].get'
transform: >
$["operationId"] = "Communications_GetWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}"].put'
transform: >
$["operationId"] = "Communications_CreateWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/chatTranscripts"].get'
transform: >
$["operationId"] = "SupportTicketChatTranscripts_ListWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/supportTickets/{supportTicketName}/chatTranscripts/{chatTranscriptName}"].get'
transform: >
$["operationId"] = "ChatTranscripts_GetWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}"].get'
transform: >
$["operationId"] = "FileWorkspaces_GetWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}"].put'
transform: >
$["operationId"] = "FileWorkspaces_CreateWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files"].get'
transform: >
$["operationId"] = "Files_ListWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}"].get'
transform: >
$["operationId"] = "Files_GetWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}"].put'
transform: >
$["operationId"] = "Files_CreateWithNoSubscriptionId";
- from: swagger-document
where: '$.paths["/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}/upload"].post'
transform: >
$["operationId"] = "Files_UploadWithNoSubscriptionId";
- where:
model-name: ProblemClassification
set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@
},
"commands": [
{
"name": "Get-AzSupportFilesNoSubscription",
"name": "Get-AzSupportFile",
"description": "Returns details of a specific file in a work space.",
"path": "/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}",
"path": "/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.support/get-azsupportfilesnosubscription"
"url": "https://learn.microsoft.com/powershell/module/az.support/get-azsupportfile"
},
"parameterSets": [
{
"parameters": [
"-FileName <String>",
"-FileWorkspaceName <String>"
"-Name <String>",
"[-SubscriptionId <String[]>]",
"-WorkspaceName <String>"
]
},
{
"parameters": [
"-Name <String>",
"-WorkspaceName <String>"
]
}
]
Expand All @@ -27,47 +34,26 @@
"description": "Returns details of a specific file in a work space.",
"parameters": [
{
"name": "-FileName",
"name": "-Name",
"value": "[Path.fileName]"
},
{
"name": "-FileWorkspaceName",
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
},
{
"name": "-WorkspaceName",
"value": "[Path.fileWorkspaceName]"
}
]
}
]
},
{
"name": "Get-AzSupportFile",
"description": "Returns details of a specific file in a work space.",
"path": "/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.support/get-azsupportfile"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"[-SubscriptionId <String[]>]",
"-WorkspaceName <String>"
]
}
]
},
"examples": [
{
"description": "Returns details of a specific file in a work space.",
"parameters": [
{
"name": "-Name",
"value": "[Path.fileName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
},
{
"name": "-WorkspaceName",
"value": "[Path.fileWorkspaceName]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,6 @@
"url": "https://learn.microsoft.com/powershell/module/az.support"
},
"commands": [
{
"name": "Get-AzSupportFileWorkspacesNoSubscription",
"description": "Gets details for a specific file workspace.",
"path": "/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.support/get-azsupportfileworkspacesnosubscription"
},
"parameterSets": [
{
"parameters": [
"-FileWorkspaceName <String>"
]
}
]
},
"examples": [
{
"description": "Gets details for a specific file workspace.",
"parameters": [
{
"name": "-FileWorkspaceName",
"value": "[Path.fileWorkspaceName]"
}
]
}
]
},
{
"name": "Get-AzSupportFileWorkspace",
"description": "Gets details for a specific file workspace in an Azure subscription.",
Expand All @@ -47,6 +19,11 @@
"-Name <String>",
"[-SubscriptionId <String[]>]"
]
},
{
"parameters": [
"-Name <String>"
]
}
]
},
Expand All @@ -63,6 +40,15 @@
"value": "[Path.subscriptionId]"
}
]
},
{
"description": "Gets details for a specific file workspace.",
"parameters": [
{
"name": "-Name",
"value": "[Path.fileWorkspaceName]"
}
]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,6 @@
"url": "https://learn.microsoft.com/powershell/module/az.support"
},
"commands": [
{
"name": "Get-AzSupportChatTranscriptsNoSubscription",
"description": "Returns chatTranscript details for a no subscription support ticket.",
"path": "/providers/Microsoft.Support/supportTickets/{supportTicketName}/chatTranscripts/{chatTranscriptName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.support/get-azsupportchattranscriptsnosubscription"
},
"parameterSets": [
{
"parameters": [
"-ChatTranscriptName <String>",
"-SupportTicketName <String>"
]
}
]
},
"examples": [
{
"description": "Returns chatTranscript details for a no subscription support ticket.",
"parameters": [
{
"name": "-ChatTranscriptName",
"value": "[Path.chatTranscriptName]"
},
{
"name": "-SupportTicketName",
"value": "[Path.supportTicketName]"
}
]
}
]
},
{
"name": "Get-AzSupportChatTranscript",
"description": "Returns chatTranscript details for a support ticket under a subscription.",
Expand All @@ -53,6 +20,12 @@
"[-SubscriptionId <String[]>]",
"-SupportTicketName <String>"
]
},
{
"parameters": [
"-Name <String>",
"-SupportTicketName <String>"
]
}
]
},
Expand All @@ -73,6 +46,19 @@
"value": "[Path.supportTicketName]"
}
]
},
{
"description": "Returns chatTranscript details for a no subscription support ticket.",
"parameters": [
{
"name": "-Name",
"value": "[Path.chatTranscriptName]"
},
{
"name": "-SupportTicketName",
"value": "[Path.supportTicketName]"
}
]
}
]
}
Expand Down
Loading

0 comments on commit 69b3443

Please sign in to comment.