From 9883ead19e217c2e3104df009b5e4c981d4e74d9 Mon Sep 17 00:00:00 2001 From: Alex-wdy Date: Tue, 22 Nov 2022 15:15:08 +0800 Subject: [PATCH 1/6] update the UX files --- .../DataFactories/UX/Microsoft.Datafactory/factories.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/DataFactory/DataFactories/UX/Microsoft.Datafactory/factories.json b/src/DataFactory/DataFactories/UX/Microsoft.Datafactory/factories.json index da309f6790fe..d7346f6891c5 100644 --- a/src/DataFactory/DataFactories/UX/Microsoft.Datafactory/factories.json +++ b/src/DataFactory/DataFactories/UX/Microsoft.Datafactory/factories.json @@ -29,6 +29,10 @@ { "name":"-ResourceGroupName", "value":"[path.resourceGroupName]" + }, + { + "name":"-Name", + "value":"[path.dataFactoryName]" } ] } @@ -58,6 +62,10 @@ { "name":"-ResourceGroupName", "value":"[path.resourceGroupName]" + }, + { + "name":"-Name", + "value":"[path.dataFactoryName]" } ] } From 9cb6161e0dca8783ba0d3e02642492b9faef6731 Mon Sep 17 00:00:00 2001 From: Alex-wdy Date: Tue, 22 Nov 2022 15:44:11 +0800 Subject: [PATCH 2/6] update the UX files --- .../UX/Microsoft.Accounts}/subscriptions.json | 0 src/Sql/Sql/UX/Microsoft.Sql/sqlDatabase.json | 33 +++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) rename src/{Resources/Resources/UX/Microsoft.Resources => Accounts/Accounts/UX/Microsoft.Accounts}/subscriptions.json (100%) diff --git a/src/Resources/Resources/UX/Microsoft.Resources/subscriptions.json b/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json similarity index 100% rename from src/Resources/Resources/UX/Microsoft.Resources/subscriptions.json rename to src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json diff --git a/src/Sql/Sql/UX/Microsoft.Sql/sqlDatabase.json b/src/Sql/Sql/UX/Microsoft.Sql/sqlDatabase.json index ac39d821c562..69125e3c6c36 100644 --- a/src/Sql/Sql/UX/Microsoft.Sql/sqlDatabase.json +++ b/src/Sql/Sql/UX/Microsoft.Sql/sqlDatabase.json @@ -87,34 +87,39 @@ }, { "name":"Suspend-AzSqlDatabase", - "description":"Restarts an Azure virtual machine.", - "path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{VMName}", + "description":"Suspends a SQL Data Warehouse database.", + "path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{ServerName}/databases", "confirmation":false, "help":{ "learnMore":{ - "url":"https://learn.microsoft.com/powershell/module/az.compute/restart-azvm" + "url":"https://learn.microsoft.com/powershell/module/az.sql/suspend-azsqldatabase" }, "parameterSets":[ { "parameters":[ - "[-ResourceGroupName] ", - "[-VMName] " + "[[-ResourceGroupName] ]", + "[[-ServerName] ]", + "[[-DatabaseName] ]" ] } ] }, "examples":[ { - "description":"Restarts an Azure virtual machine.", + "description":"Suspends a SQL Data Warehouse database.", "parameters":[ - { - "name":"-ResourceGroupName", - "value":"[path.resourceGroupName]" - }, - { - "name":"-Name", - "value":"[path.VMName]" - } + { + "name":"-ResourceGroupName", + "value":"[path.resourceGroupName]" + }, + { + "name":"-ServerName", + "value":"[path.ServerName]" + }, + { + "name":"-DatabaseName", + "value":"[path.DatabaseName]" + } ] } ] From 0f2b320f8458b44ce5a28447f764d455e8ac3526 Mon Sep 17 00:00:00 2001 From: Alex-wdy Date: Tue, 22 Nov 2022 15:48:56 +0800 Subject: [PATCH 3/6] update the UX files --- .../UX/Microsoft.ApplicationInsights}/components.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{Monitor/Monitor/UX/Microsoft.Monitor => ApplicationInsights/ApplicationInsights/UX/Microsoft.ApplicationInsights}/components.json (100%) diff --git a/src/Monitor/Monitor/UX/Microsoft.Monitor/components.json b/src/ApplicationInsights/ApplicationInsights/UX/Microsoft.ApplicationInsights/components.json similarity index 100% rename from src/Monitor/Monitor/UX/Microsoft.Monitor/components.json rename to src/ApplicationInsights/ApplicationInsights/UX/Microsoft.ApplicationInsights/components.json From 7d05f1b2bc969b3e2a8d7ef3b66fd59e70a7f011 Mon Sep 17 00:00:00 2001 From: Alex-wdy Date: Tue, 22 Nov 2022 16:49:44 +0800 Subject: [PATCH 4/6] update the UX files --- .../UX/Microsoft.Accounts/subscriptions.json | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json b/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json index 5d6fcd771524..8257b2882a3c 100644 --- a/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json +++ b/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json @@ -8,7 +8,7 @@ { "name":"Get-AzSubscription", "description":"Get subscriptions that the current account can access.", - "path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/subscriptions", + "path":"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/subscriptions", "confirmation":false, "help":{ "learnMore":{ @@ -17,8 +17,7 @@ "parameterSets":[ { "parameters":[ - "[[-ResourceGroupName] ]", - "[[-TenantId] ]" + "[[-SubscriptionId] ]" ] } ] @@ -28,12 +27,8 @@ "description":"Get subscriptions that the current account can access.", "parameters":[ { - "name":"-ResourceGroupName", - "value":"[path.resourceGroupName]" - }, - { - "name":"-TenantId", - "value":"[path.TenantId]" + "name":"-SubscriptionId", + "value":"[path.subscriptionId]" } ] } From 8acde8d09aa8dc93b4114ab95e03066062fa8f7f Mon Sep 17 00:00:00 2001 From: wyunchi-ms Date: Tue, 22 Nov 2022 16:56:06 +0800 Subject: [PATCH 5/6] Remove the suppressed exceptions --- .../Exceptions/Az.DataFactory/UXMetadataIssues.csv | 2 -- .../Exceptions/Az.Monitor/UXMetadataIssues.csv | 7 ------- .../Exceptions/Az.Resources/UXMetadataIssues.csv | 5 ----- .../StaticAnalysis/Exceptions/Az.Sql/UXMetadataIssues.csv | 4 ---- 4 files changed, 18 deletions(-) delete mode 100644 tools/StaticAnalysis/Exceptions/Az.DataFactory/UXMetadataIssues.csv delete mode 100644 tools/StaticAnalysis/Exceptions/Az.Monitor/UXMetadataIssues.csv delete mode 100644 tools/StaticAnalysis/Exceptions/Az.Resources/UXMetadataIssues.csv delete mode 100644 tools/StaticAnalysis/Exceptions/Az.Sql/UXMetadataIssues.csv diff --git a/tools/StaticAnalysis/Exceptions/Az.DataFactory/UXMetadataIssues.csv b/tools/StaticAnalysis/Exceptions/Az.DataFactory/UXMetadataIssues.csv deleted file mode 100644 index 2dcb7dc7792a..000000000000 --- a/tools/StaticAnalysis/Exceptions/Az.DataFactory/UXMetadataIssues.csv +++ /dev/null @@ -1,2 +0,0 @@ -"Module","Severity","ResourceType","SubResourceType","Command","Description" -"Az.DataFactory","1","Microsoft.Datafactory","factories","Remove-AzDataFactoryV2","Cannot find a matched parameter set for example of Remove-AzDataFactoryV2" diff --git a/tools/StaticAnalysis/Exceptions/Az.Monitor/UXMetadataIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Monitor/UXMetadataIssues.csv deleted file mode 100644 index 682423da0b05..000000000000 --- a/tools/StaticAnalysis/Exceptions/Az.Monitor/UXMetadataIssues.csv +++ /dev/null @@ -1,7 +0,0 @@ -"Module","Severity","ResourceType","SubResourceType","Command","Description" -"Az.Monitor","1","Microsoft.Monitor","components","Get-AzApplicationInsights","Doc url is expect: https://learn.microsoft.com/powershell/module/az.monitor/get-azapplicationinsights but get: https://learn.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsights" -"Az.Monitor","2","Microsoft.Monitor","components","Get-AzApplicationInsights","The path /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.insights/components/{name} doesn't contains the right resource tpye: Microsoft.Monitor" -"Az.Monitor","1","Microsoft.Monitor","components","Get-AzApplicationInsights","Cmdlet Get-AzApplicationInsights is not contained in Az.Monitor." -"Az.Monitor","1","Microsoft.Monitor","components","Remove-AzApplicationInsights","Doc url is expect: https://learn.microsoft.com/powershell/module/az.monitor/remove-azapplicationinsights but get: https://learn.microsoft.com/powershell/module/az.applicationinsights/remove-azapplicationinsights" -"Az.Monitor","2","Microsoft.Monitor","components","Remove-AzApplicationInsights","The path /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.insights/components/{name} doesn't contains the right resource tpye: Microsoft.Monitor" -"Az.Monitor","1","Microsoft.Monitor","components","Remove-AzApplicationInsights","Cmdlet Remove-AzApplicationInsights is not contained in Az.Monitor." diff --git a/tools/StaticAnalysis/Exceptions/Az.Resources/UXMetadataIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Resources/UXMetadataIssues.csv deleted file mode 100644 index b3819ea496b3..000000000000 --- a/tools/StaticAnalysis/Exceptions/Az.Resources/UXMetadataIssues.csv +++ /dev/null @@ -1,5 +0,0 @@ -"Module","Severity","ResourceType","SubResourceType","Command","Description" -"Az.Resources","1","Microsoft.Resources","subscriptions","Get-AzSubscription","Doc url is expect: https://learn.microsoft.com/powershell/module/az.resources/get-azsubscription but get: https://learn.microsoft.com/powershell/module/az.accounts/get-azsubscription" -"Az.Resources","1","Microsoft.Resources","subscriptions","Get-AzSubscription","Cmdlet Get-AzSubscription is not contained in Az.Resources." -"Az.Resources","2","Microsoft.Resources","subscriptionsResourcegroups","Get-AzResourceGroup","The path /subscriptions/{subscriptionId}/resourceGroups/{name} doesn't contains the right resource tpye: Microsoft.Resources" -"Az.Resources","2","Microsoft.Resources","subscriptionsResourcegroups","Remove-AzResourceGroup","The path /subscriptions/{subscriptionId}/resourceGroups/{name} doesn't contains the right resource tpye: Microsoft.Resources" diff --git a/tools/StaticAnalysis/Exceptions/Az.Sql/UXMetadataIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Sql/UXMetadataIssues.csv deleted file mode 100644 index 64bef4386c55..000000000000 --- a/tools/StaticAnalysis/Exceptions/Az.Sql/UXMetadataIssues.csv +++ /dev/null @@ -1,4 +0,0 @@ -"Module","Severity","ResourceType","SubResourceType","Command","Description" -"Az.Sql","1","Microsoft.Sql","sqlDatabase","Suspend-AzSqlDatabase","Doc url is expect: https://learn.microsoft.com/powershell/module/az.sql/suspend-azsqldatabase but get: https://learn.microsoft.com/powershell/module/az.compute/restart-azvm" -"Az.Sql","2","Microsoft.Sql","sqlDatabase","Suspend-AzSqlDatabase","The path /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{VMName} doesn't contains the right resource tpye: Microsoft.Sql" -"Az.Sql","1","Microsoft.Sql","sqlDatabase","Suspend-AzSqlDatabase","Cannot find the defination of parameter Name in example" From 6f0fb36d20a072af10636ad06fcf7038802e6e81 Mon Sep 17 00:00:00 2001 From: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> Date: Wed, 23 Nov 2022 11:09:25 +0800 Subject: [PATCH 6/6] Update subscriptions.json --- .../Accounts/UX/Microsoft.Accounts/subscriptions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json b/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json index 8257b2882a3c..020605cfeb52 100644 --- a/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json +++ b/src/Accounts/Accounts/UX/Microsoft.Accounts/subscriptions.json @@ -8,7 +8,7 @@ { "name":"Get-AzSubscription", "description":"Get subscriptions that the current account can access.", - "path":"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/subscriptions", + "path":"/subscriptions/{subscriptionId}", "confirmation":false, "help":{ "learnMore":{ @@ -35,4 +35,4 @@ ] } ] - } \ No newline at end of file + }