@autorest/powershell 4.0.0-dev.7 → 4.0.0-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/.rush/temp/package-deps_build.json +58 -54
  2. package/autorest-configuration.md +1 -1
  3. package/dist/cmdlets/class.d.ts +7 -0
  4. package/dist/cmdlets/class.d.ts.map +1 -1
  5. package/dist/cmdlets/class.js +248 -81
  6. package/dist/cmdlets/class.js.map +1 -1
  7. package/dist/cmdlets/namespace.d.ts.map +1 -1
  8. package/dist/cmdlets/namespace.js +1 -0
  9. package/dist/cmdlets/namespace.js.map +1 -1
  10. package/dist/generators/psm1.js +1 -1
  11. package/dist/generators/script-cmdlet.js +1 -1
  12. package/dist/internal/powershell-declarations.d.ts +1 -0
  13. package/dist/internal/powershell-declarations.d.ts.map +1 -1
  14. package/dist/internal/powershell-declarations.js +2 -1
  15. package/dist/internal/powershell-declarations.js.map +1 -1
  16. package/dist/internal/project.d.ts +9 -4
  17. package/dist/internal/project.d.ts.map +1 -1
  18. package/dist/internal/project.js +7 -9
  19. package/dist/internal/project.js.map +1 -1
  20. package/dist/llcsharp/clientruntime.d.ts +1 -0
  21. package/dist/llcsharp/clientruntime.d.ts.map +1 -1
  22. package/dist/llcsharp/clientruntime.js +1 -0
  23. package/dist/llcsharp/clientruntime.js.map +1 -1
  24. package/dist/llcsharp/csharp-declarations.d.ts +1 -0
  25. package/dist/llcsharp/csharp-declarations.d.ts.map +1 -1
  26. package/dist/llcsharp/csharp-declarations.js +2 -1
  27. package/dist/llcsharp/csharp-declarations.js.map +1 -1
  28. package/dist/llcsharp/model/interface.d.ts.map +1 -1
  29. package/dist/llcsharp/model/interface.js +14 -0
  30. package/dist/llcsharp/model/interface.js.map +1 -1
  31. package/dist/llcsharp/model/model-class.d.ts.map +1 -1
  32. package/dist/llcsharp/model/model-class.js +27 -11
  33. package/dist/llcsharp/model/model-class.js.map +1 -1
  34. package/dist/llcsharp/model/namespace.d.ts.map +1 -1
  35. package/dist/llcsharp/model/namespace.js +3 -11
  36. package/dist/llcsharp/model/namespace.js.map +1 -1
  37. package/dist/llcsharp/project.d.ts +2 -1
  38. package/dist/llcsharp/project.d.ts.map +1 -1
  39. package/dist/llcsharp/project.js +5 -3
  40. package/dist/llcsharp/project.js.map +1 -1
  41. package/dist/llcsharp/schema/array.js +7 -7
  42. package/dist/llcsharp/schema/array.js.map +1 -1
  43. package/dist/llcsharp/schema/fixed-array.d.ts +42 -0
  44. package/dist/llcsharp/schema/fixed-array.d.ts.map +1 -0
  45. package/dist/llcsharp/schema/fixed-array.js +251 -0
  46. package/dist/llcsharp/schema/fixed-array.js.map +1 -0
  47. package/dist/llcsharp/schema/schema-resolver.d.ts +1 -1
  48. package/dist/llcsharp/schema/schema-resolver.d.ts.map +1 -1
  49. package/dist/llcsharp/schema/schema-resolver.js +12 -10
  50. package/dist/llcsharp/schema/schema-resolver.js.map +1 -1
  51. package/dist/plugins/create-commands-v2.d.ts +1 -0
  52. package/dist/plugins/create-commands-v2.d.ts.map +1 -1
  53. package/dist/plugins/create-commands-v2.js +39 -6
  54. package/dist/plugins/create-commands-v2.js.map +1 -1
  55. package/dist/plugins/cs-namer-v2.d.ts.map +1 -1
  56. package/dist/plugins/cs-namer-v2.js +10 -7
  57. package/dist/plugins/cs-namer-v2.js.map +1 -1
  58. package/dist/plugins/llcsharp-v2.d.ts.map +1 -1
  59. package/dist/plugins/llcsharp-v2.js +4 -1
  60. package/dist/plugins/llcsharp-v2.js.map +1 -1
  61. package/dist/plugins/modifiers-v2.d.ts.map +1 -1
  62. package/dist/plugins/modifiers-v2.js +21 -2
  63. package/dist/plugins/modifiers-v2.js.map +1 -1
  64. package/dist/plugins/plugin-tweak-m4-model.d.ts.map +1 -1
  65. package/dist/plugins/plugin-tweak-m4-model.js +12 -0
  66. package/dist/plugins/plugin-tweak-m4-model.js.map +1 -1
  67. package/dist/plugins/sdk-create-inline-properties.d.ts.map +1 -1
  68. package/dist/plugins/sdk-create-inline-properties.js +26 -0
  69. package/dist/plugins/sdk-create-inline-properties.js.map +1 -1
  70. package/dist/plugins/sdk-cs-namer.d.ts.map +1 -1
  71. package/dist/plugins/sdk-cs-namer.js +17 -9
  72. package/dist/plugins/sdk-cs-namer.js.map +1 -1
  73. package/dist/plugins/sdk-tweak-model.d.ts.map +1 -1
  74. package/dist/plugins/sdk-tweak-model.js +13 -5
  75. package/dist/plugins/sdk-tweak-model.js.map +1 -1
  76. package/dist/utils/resourceName.d.ts +3 -0
  77. package/dist/utils/resourceName.d.ts.map +1 -0
  78. package/dist/utils/resourceName.js +29 -0
  79. package/dist/utils/resourceName.js.map +1 -0
  80. package/dist/utils/sort-parameters.d.ts +3 -0
  81. package/dist/utils/sort-parameters.d.ts.map +1 -0
  82. package/dist/utils/sort-parameters.js +33 -0
  83. package/dist/utils/sort-parameters.js.map +1 -0
  84. package/package.json +1 -1
  85. package/resources/assets/build-module.ps1 +4 -4
  86. package/resources/assets/check-dependencies.ps1 +3 -3
  87. package/resources/assets/create-model-cmdlets.ps1 +84 -15
  88. package/resources/assets/custom/README.md +1 -1
  89. package/resources/assets/docs/README.md +1 -1
  90. package/resources/assets/export-surface.ps1 +3 -3
  91. package/resources/assets/exports/README.md +1 -1
  92. package/resources/assets/generate-help.ps1 +3 -3
  93. package/resources/assets/generate-portal-ux.ps1 +3 -3
  94. package/resources/assets/how-to.md +1 -1
  95. package/resources/assets/internal/README.md +1 -1
  96. package/resources/assets/run-module.ps1 +4 -4
  97. package/resources/assets/test-module.ps1 +6 -6
  98. package/resources/assets/tools/Resources/custom/New-AzDeployment.ps1 +1 -1
  99. package/resources/assets/tools/Resources/docs/README.md +1 -1
  100. package/resources/assets/tools/Resources/how-to.md +1 -1
  101. package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.nuspec +1 -1
  102. package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psd1 +1 -1
  103. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml +34 -34
  104. package/resources/modules/Az.Accounts/2.7.5/en-US/about_az.help.txt +1 -1
  105. package/resources/modules/Az.Accounts/2.7.5/package/services/metadata/core-properties/1aa0749a068a4238881858013f1a5b7f.psmdcp +1 -1
  106. package/resources/psruntime/Attributes/PSArgumentCompleterAttribute.cs +52 -0
  107. package/resources/psruntime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +3 -1
  108. package/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs +18 -1
  109. package/resources/psruntime/BuildTime/Models/PsProxyTypes.cs +15 -2
  110. package/resources/psruntime/BuildTime/PsAttributes.cs +5 -0
  111. package/resources/psruntime/BuildTime/PsExtensions.cs +7 -0
  112. package/resources/psruntime/TypeConverterExtensions.cs +50 -0
  113. package/resources/runtime/csharp/json/Nodes/Collections/XNodeArray.cs +5 -0
  114. package/resources/runtime/csharp/pipeline/ISendAsync.cs +113 -0
  115. package/resources/templates/methodBodyRestCall.ejs +1 -1
@@ -1384,7 +1384,7 @@ TestEnvironment TestRMEndpoint TestADEndpoint/</dev:code>
1384
1384
  <command:relatedLinks>
1385
1385
  <maml:navigationLink>
1386
1386
  <maml:linkText>Online Version:</maml:linkText>
1387
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/add-azenvironment</maml:uri>
1387
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/add-azenvironment</maml:uri>
1388
1388
  </maml:navigationLink>
1389
1389
  <maml:navigationLink>
1390
1390
  <maml:linkText>Get-AzEnvironment</maml:linkText>
@@ -1602,7 +1602,7 @@ TestEnvironment TestRMEndpoint TestADEndpoint/</dev:code>
1602
1602
  <command:relatedLinks>
1603
1603
  <maml:navigationLink>
1604
1604
  <maml:linkText>Online Version:</maml:linkText>
1605
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/clear-azcontext</maml:uri>
1605
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/clear-azcontext</maml:uri>
1606
1606
  </maml:navigationLink>
1607
1607
  </command:relatedLinks>
1608
1608
  </command:command>
@@ -1840,7 +1840,7 @@ TestEnvironment TestRMEndpoint TestADEndpoint/</dev:code>
1840
1840
  <command:relatedLinks>
1841
1841
  <maml:navigationLink>
1842
1842
  <maml:linkText>Online Version:</maml:linkText>
1843
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/clear-azdefault</maml:uri>
1843
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/clear-azdefault</maml:uri>
1844
1844
  </maml:navigationLink>
1845
1845
  </command:relatedLinks>
1846
1846
  </command:command>
@@ -3803,7 +3803,7 @@ xxxxxxxx-xxxx-xxxx-xxxxxxxx Subscription1 yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy Azu
3803
3803
  <command:relatedLinks>
3804
3804
  <maml:navigationLink>
3805
3805
  <maml:linkText>Online Version:</maml:linkText>
3806
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/connect-azaccount</maml:uri>
3806
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/connect-azaccount</maml:uri>
3807
3807
  </maml:navigationLink>
3808
3808
  </command:relatedLinks>
3809
3809
  </command:command>
@@ -3973,7 +3973,7 @@ Disable-AzContextAutosave -Scope Process</dev:code>
3973
3973
  <command:relatedLinks>
3974
3974
  <maml:navigationLink>
3975
3975
  <maml:linkText>Online Version:</maml:linkText>
3976
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/disable-azcontextautosave</maml:uri>
3976
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/disable-azcontextautosave</maml:uri>
3977
3977
  </maml:navigationLink>
3978
3978
  </command:relatedLinks>
3979
3979
  </command:command>
@@ -4105,7 +4105,7 @@ Disable-AzContextAutosave -Scope Process</dev:code>
4105
4105
  <command:relatedLinks>
4106
4106
  <maml:navigationLink>
4107
4107
  <maml:linkText>Online Version:</maml:linkText>
4108
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/disable-azdatacollection</maml:uri>
4108
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/disable-azdatacollection</maml:uri>
4109
4109
  </maml:navigationLink>
4110
4110
  <maml:navigationLink>
4111
4111
  <maml:linkText>Enable-AzDataCollection</maml:linkText>
@@ -4326,7 +4326,7 @@ Disable-AzContextAutosave -Scope Process</dev:code>
4326
4326
  <command:relatedLinks>
4327
4327
  <maml:navigationLink>
4328
4328
  <maml:linkText>Online Version:</maml:linkText>
4329
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/disable-azurermalias</maml:uri>
4329
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/disable-azurermalias</maml:uri>
4330
4330
  </maml:navigationLink>
4331
4331
  </command:relatedLinks>
4332
4332
  </command:command>
@@ -4868,7 +4868,7 @@ Disable-AzContextAutosave -Scope Process</dev:code>
4868
4868
  <command:relatedLinks>
4869
4869
  <maml:navigationLink>
4870
4870
  <maml:linkText>Online Version:</maml:linkText>
4871
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/disconnect-azaccount</maml:uri>
4871
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/disconnect-azaccount</maml:uri>
4872
4872
  </maml:navigationLink>
4873
4873
  </command:relatedLinks>
4874
4874
  </command:command>
@@ -4878,7 +4878,7 @@ Disable-AzContextAutosave -Scope Process</dev:code>
4878
4878
  <command:verb>Enable</command:verb>
4879
4879
  <command:noun>AzContextAutosave</command:noun>
4880
4880
  <maml:description>
4881
- <maml:para>Azure contexts are PowerShell objects representing your active subscription to run commands against, and the authentication information needed to connect to an Azure cloud. With Azure contexts, Azure PowerShell doesn't need to reauthenticate your account each time you switch subscriptions. For more information, see Azure PowerShell context objects (https://docs.microsoft.com/powershell/azure/context-persistence).</maml:para>
4881
+ <maml:para>Azure contexts are PowerShell objects representing your active subscription to run commands against, and the authentication information needed to connect to an Azure cloud. With Azure contexts, Azure PowerShell doesn't need to reauthenticate your account each time you switch subscriptions. For more information, see Azure PowerShell context objects (https://learn.microsoft.com/powershell/azure/context-persistence).</maml:para>
4882
4882
  <maml:para>This cmdlet allows the Azure context information to be saved and automatically loaded when you start a PowerShell process. For example, when opening a new window.</maml:para>
4883
4883
  </maml:description>
4884
4884
  </command:details>
@@ -5039,7 +5039,7 @@ Enable-AzContextAutosave -Scope Process</dev:code>
5039
5039
  <command:relatedLinks>
5040
5040
  <maml:navigationLink>
5041
5041
  <maml:linkText>Online Version:</maml:linkText>
5042
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/enable-azcontextautosave</maml:uri>
5042
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/enable-azcontextautosave</maml:uri>
5043
5043
  </maml:navigationLink>
5044
5044
  </command:relatedLinks>
5045
5045
  </command:command>
@@ -5171,7 +5171,7 @@ Enable-AzContextAutosave -Scope Process</dev:code>
5171
5171
  <command:relatedLinks>
5172
5172
  <maml:navigationLink>
5173
5173
  <maml:linkText>Online Version:</maml:linkText>
5174
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/enable-azdatacollection</maml:uri>
5174
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/enable-azdatacollection</maml:uri>
5175
5175
  </maml:navigationLink>
5176
5176
  <maml:navigationLink>
5177
5177
  <maml:linkText>Disable-AzDataCollection</maml:linkText>
@@ -5393,7 +5393,7 @@ Enable-AzContextAutosave -Scope Process</dev:code>
5393
5393
  <command:relatedLinks>
5394
5394
  <maml:navigationLink>
5395
5395
  <maml:linkText>Online Version:</maml:linkText>
5396
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/enable-azurermalias</maml:uri>
5396
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/enable-azurermalias</maml:uri>
5397
5397
  </maml:navigationLink>
5398
5398
  </command:relatedLinks>
5399
5399
  </command:command>
@@ -5596,7 +5596,7 @@ Enable-AzContextAutosave -Scope Process</dev:code>
5596
5596
  <command:relatedLinks>
5597
5597
  <maml:navigationLink>
5598
5598
  <maml:linkText>Online Version:</maml:linkText>
5599
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/get-azaccesstoken</maml:uri>
5599
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/get-azaccesstoken</maml:uri>
5600
5600
  </maml:navigationLink>
5601
5601
  </command:relatedLinks>
5602
5602
  </command:command>
@@ -5787,7 +5787,7 @@ Subscription3 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription3
5787
5787
  <command:relatedLinks>
5788
5788
  <maml:navigationLink>
5789
5789
  <maml:linkText>Online Version:</maml:linkText>
5790
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/get-azcontext</maml:uri>
5790
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/get-azcontext</maml:uri>
5791
5791
  </maml:navigationLink>
5792
5792
  <maml:navigationLink>
5793
5793
  <maml:linkText>Set-AzContext</maml:linkText>
@@ -5932,7 +5932,7 @@ Settings : {}</dev:code>
5932
5932
  <command:relatedLinks>
5933
5933
  <maml:navigationLink>
5934
5934
  <maml:linkText>Online Version:</maml:linkText>
5935
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/get-azcontextautosavesetting</maml:uri>
5935
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/get-azcontextautosavesetting</maml:uri>
5936
5936
  </maml:navigationLink>
5937
5937
  </command:relatedLinks>
5938
5938
  </command:command>
@@ -6064,7 +6064,7 @@ Tags :</dev:code>
6064
6064
  <command:relatedLinks>
6065
6065
  <maml:navigationLink>
6066
6066
  <maml:linkText>Online Version:</maml:linkText>
6067
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/get-azdefault</maml:uri>
6067
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/get-azdefault</maml:uri>
6068
6068
  </maml:navigationLink>
6069
6069
  </command:relatedLinks>
6070
6070
  </command:command>
@@ -6248,7 +6248,7 @@ AzureUSGovernment https://management.usgovcloudapi.net/ https://login.microsofto
6248
6248
  <command:relatedLinks>
6249
6249
  <maml:navigationLink>
6250
6250
  <maml:linkText>Online Version:</maml:linkText>
6251
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/get-azenvironment</maml:uri>
6251
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/get-azenvironment</maml:uri>
6252
6252
  </maml:navigationLink>
6253
6253
  <maml:navigationLink>
6254
6254
  <maml:linkText>Add-AzEnvironment</maml:linkText>
@@ -6526,7 +6526,7 @@ Subscription1 (xxxx-xxxx-xxxx-xxxx) azureuser@micros... Subscription1
6526
6526
  <command:relatedLinks>
6527
6527
  <maml:navigationLink>
6528
6528
  <maml:linkText>Online Version:</maml:linkText>
6529
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/get-azsubscription</maml:uri>
6529
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/get-azsubscription</maml:uri>
6530
6530
  </maml:navigationLink>
6531
6531
  </command:relatedLinks>
6532
6532
  </command:command>
@@ -6656,7 +6656,7 @@ xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Microsoft Home {test0.com, test1.com,
6656
6656
  <command:relatedLinks>
6657
6657
  <maml:navigationLink>
6658
6658
  <maml:linkText>Online Version:</maml:linkText>
6659
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/get-aztenant</maml:uri>
6659
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/get-aztenant</maml:uri>
6660
6660
  </maml:navigationLink>
6661
6661
  </command:relatedLinks>
6662
6662
  </command:command>
@@ -6942,7 +6942,7 @@ azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud</dev:
6942
6942
  <command:relatedLinks>
6943
6943
  <maml:navigationLink>
6944
6944
  <maml:linkText>Online Version:</maml:linkText>
6945
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/import-azcontext</maml:uri>
6945
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/import-azcontext</maml:uri>
6946
6946
  </maml:navigationLink>
6947
6947
  </command:relatedLinks>
6948
6948
  </command:command>
@@ -7580,7 +7580,7 @@ Content : {"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users
7580
7580
  <command:relatedLinks>
7581
7581
  <maml:navigationLink>
7582
7582
  <maml:linkText>Online Version:</maml:linkText>
7583
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/invoke-azrestmethod</maml:uri>
7583
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/invoke-azrestmethod</maml:uri>
7584
7584
  </maml:navigationLink>
7585
7585
  </command:relatedLinks>
7586
7586
  </command:command>
@@ -7634,7 +7634,7 @@ Opening the default browser to https://aka.ms/azpssurvey?Q_CHL=INTERCEPT</dev:co
7634
7634
  <command:relatedLinks>
7635
7635
  <maml:navigationLink>
7636
7636
  <maml:linkText>Online Version:</maml:linkText>
7637
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/open-azsurveylink</maml:uri>
7637
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/open-azsurveylink</maml:uri>
7638
7638
  </maml:navigationLink>
7639
7639
  </command:relatedLinks>
7640
7640
  </command:command>
@@ -7742,7 +7742,7 @@ Opening the default browser to https://aka.ms/azpssurvey?Q_CHL=INTERCEPT</dev:co
7742
7742
  <command:relatedLinks>
7743
7743
  <maml:navigationLink>
7744
7744
  <maml:linkText>Online Version:</maml:linkText>
7745
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/register-azmodule</maml:uri>
7745
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/register-azmodule</maml:uri>
7746
7746
  </maml:navigationLink>
7747
7747
  </command:relatedLinks>
7748
7748
  </command:command>
@@ -8071,7 +8071,7 @@ Opening the default browser to https://aka.ms/azpssurvey?Q_CHL=INTERCEPT</dev:co
8071
8071
  <command:relatedLinks>
8072
8072
  <maml:navigationLink>
8073
8073
  <maml:linkText>Online Version:</maml:linkText>
8074
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/remove-azcontext</maml:uri>
8074
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/remove-azcontext</maml:uri>
8075
8075
  </maml:navigationLink>
8076
8076
  </command:relatedLinks>
8077
8077
  </command:command>
@@ -8270,7 +8270,7 @@ TestEnvironment TestRMEndpoint TestADEndpoint/</dev:code>
8270
8270
  <command:relatedLinks>
8271
8271
  <maml:navigationLink>
8272
8272
  <maml:linkText>Online Version:</maml:linkText>
8273
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/remove-azenvironment</maml:uri>
8273
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/remove-azenvironment</maml:uri>
8274
8274
  </maml:navigationLink>
8275
8275
  <maml:navigationLink>
8276
8276
  <maml:linkText>Add-AzEnvironment</maml:linkText>
@@ -8656,7 +8656,7 @@ TestEnvironment TestRMEndpoint TestADEndpoint/</dev:code>
8656
8656
  <command:relatedLinks>
8657
8657
  <maml:navigationLink>
8658
8658
  <maml:linkText>Online Version:</maml:linkText>
8659
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/rename-azcontext</maml:uri>
8659
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/rename-azcontext</maml:uri>
8660
8660
  </maml:navigationLink>
8661
8661
  </command:relatedLinks>
8662
8662
  </command:command>
@@ -8951,7 +8951,7 @@ HistoryId : 8</dev:code>
8951
8951
  <command:relatedLinks>
8952
8952
  <maml:navigationLink>
8953
8953
  <maml:linkText>Online Version:</maml:linkText>
8954
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/resolve-azerror</maml:uri>
8954
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/resolve-azerror</maml:uri>
8955
8955
  </maml:navigationLink>
8956
8956
  </command:relatedLinks>
8957
8957
  </command:command>
@@ -9164,7 +9164,7 @@ Save-AzContext -Path C:\test.json</dev:code>
9164
9164
  <command:relatedLinks>
9165
9165
  <maml:navigationLink>
9166
9166
  <maml:linkText>Online Version:</maml:linkText>
9167
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/save-azcontext</maml:uri>
9167
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/save-azcontext</maml:uri>
9168
9168
  </maml:navigationLink>
9169
9169
  </command:relatedLinks>
9170
9170
  </command:command>
@@ -9439,7 +9439,7 @@ Select-AzContext -Name TestEnvironment -Scope Process</dev:code>
9439
9439
  <command:relatedLinks>
9440
9440
  <maml:navigationLink>
9441
9441
  <maml:linkText>Online Version:</maml:linkText>
9442
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/select-azcontext</maml:uri>
9442
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/select-azcontext</maml:uri>
9443
9443
  </maml:navigationLink>
9444
9444
  </command:relatedLinks>
9445
9445
  </command:command>
@@ -9541,7 +9541,7 @@ your@email.com</dev:code>
9541
9541
  <command:relatedLinks>
9542
9542
  <maml:navigationLink>
9543
9543
  <maml:linkText>Online Version:</maml:linkText>
9544
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/send-feedback</maml:uri>
9544
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/send-feedback</maml:uri>
9545
9545
  </maml:navigationLink>
9546
9546
  </command:relatedLinks>
9547
9547
  </command:command>
@@ -10276,7 +10276,7 @@ Work test@outlook.com Subscription1 AzureCloud xxxxxxxx-x..
10276
10276
  <command:relatedLinks>
10277
10277
  <maml:navigationLink>
10278
10278
  <maml:linkText>Online Version:</maml:linkText>
10279
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/set-azcontext</maml:uri>
10279
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/set-azcontext</maml:uri>
10280
10280
  </maml:navigationLink>
10281
10281
  <maml:navigationLink>
10282
10282
  <maml:linkText>Get-AzContext</maml:linkText>
@@ -10494,7 +10494,7 @@ Tags :</dev:code>
10494
10494
  <command:relatedLinks>
10495
10495
  <maml:navigationLink>
10496
10496
  <maml:linkText>Online Version:</maml:linkText>
10497
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/set-azdefault</maml:uri>
10497
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/set-azdefault</maml:uri>
10498
10498
  </maml:navigationLink>
10499
10499
  </command:relatedLinks>
10500
10500
  </command:command>
@@ -11726,7 +11726,7 @@ AzureSynapseAnalyticsEndpointResourceId :</dev:code>
11726
11726
  <command:relatedLinks>
11727
11727
  <maml:navigationLink>
11728
11728
  <maml:linkText>Online Version:</maml:linkText>
11729
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/set-azenvironment</maml:uri>
11729
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/set-azenvironment</maml:uri>
11730
11730
  </maml:navigationLink>
11731
11731
  <maml:navigationLink>
11732
11732
  <maml:linkText>Add-AzEnvironment</maml:linkText>
@@ -11893,7 +11893,7 @@ AzureSynapseAnalyticsEndpointResourceId :</dev:code>
11893
11893
  <command:relatedLinks>
11894
11894
  <maml:navigationLink>
11895
11895
  <maml:linkText>Online Version:</maml:linkText>
11896
- <maml:uri>https://docs.microsoft.com/powershell/module/az.accounts/uninstall-azurerm</maml:uri>
11896
+ <maml:uri>https://learn.microsoft.com/powershell/module/az.accounts/uninstall-azurerm</maml:uri>
11897
11897
  </maml:navigationLink>
11898
11898
  </command:relatedLinks>
11899
11899
  </command:command>
@@ -47,4 +47,4 @@ GETTING STARTED
47
47
 
48
48
  SEE ALSO
49
49
 
50
- Azure PowerShell documentation: https://docs.microsoft.com/powershell/azure
50
+ Azure PowerShell documentation: https://learn.microsoft.com/powershell/azure
@@ -3,7 +3,7 @@
3
3
  <dc:creator>Microsoft Corporation</dc:creator>
4
4
  <dc:description>Microsoft Azure PowerShell - Accounts credential management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
5
5
 
6
- For more information on account credential management, please visit the following: https://docs.microsoft.com/powershell/azure/authenticate-azureps</dc:description>
6
+ For more information on account credential management, please visit the following: https://learn.microsoft.com/powershell/azure/authenticate-azureps</dc:description>
7
7
  <dc:identifier>Az.Accounts</dc:identifier>
8
8
  <version>2.7.5</version>
9
9
  <keywords>Azure ResourceManager ARM Accounts Authentication Environment Subscription PSModule PSIncludes_Cmdlet PSCmdlet_Disable-AzDataCollection PSCmdlet_Disable-AzContextAutosave PSCmdlet_Enable-AzDataCollection PSCmdlet_Enable-AzContextAutosave PSCmdlet_Remove-AzEnvironment PSCmdlet_Get-AzEnvironment PSCmdlet_Set-AzEnvironment PSCmdlet_Add-AzEnvironment PSCmdlet_Get-AzSubscription PSCmdlet_Connect-AzAccount PSCmdlet_Get-AzContext PSCmdlet_Set-AzContext PSCmdlet_Import-AzContext PSCmdlet_Save-AzContext PSCmdlet_Get-AzTenant PSCmdlet_Send-Feedback PSCmdlet_Resolve-AzError PSCmdlet_Select-AzContext PSCmdlet_Rename-AzContext PSCmdlet_Remove-AzContext PSCmdlet_Clear-AzContext PSCmdlet_Disconnect-AzAccount PSCmdlet_Get-AzContextAutosaveSetting PSCmdlet_Set-AzDefault PSCmdlet_Get-AzDefault PSCmdlet_Clear-AzDefault PSCmdlet_Register-AzModule PSCmdlet_Enable-AzureRmAlias PSCmdlet_Disable-AzureRmAlias PSCmdlet_Uninstall-AzureRm PSCmdlet_Invoke-AzRestMethod PSCmdlet_Get-AzAccessToken PSCmdlet_Open-AzSurveyLink PSCommand_Disable-AzDataCollection PSCommand_Disable-AzContextAutosave PSCommand_Enable-AzDataCollection PSCommand_Enable-AzContextAutosave PSCommand_Remove-AzEnvironment PSCommand_Get-AzEnvironment PSCommand_Set-AzEnvironment PSCommand_Add-AzEnvironment PSCommand_Get-AzSubscription PSCommand_Connect-AzAccount PSCommand_Get-AzContext PSCommand_Set-AzContext PSCommand_Import-AzContext PSCommand_Save-AzContext PSCommand_Get-AzTenant PSCommand_Send-Feedback PSCommand_Resolve-AzError PSCommand_Select-AzContext PSCommand_Rename-AzContext PSCommand_Remove-AzContext PSCommand_Clear-AzContext PSCommand_Disconnect-AzAccount PSCommand_Get-AzContextAutosaveSetting PSCommand_Set-AzDefault PSCommand_Get-AzDefault PSCommand_Clear-AzDefault PSCommand_Register-AzModule PSCommand_Enable-AzureRmAlias PSCommand_Disable-AzureRmAlias PSCommand_Uninstall-AzureRm PSCommand_Invoke-AzRestMethod PSCommand_Get-AzAccessToken PSCommand_Open-AzSurveyLink PSCommand_Add-AzAccount PSCommand_Login-AzAccount PSCommand_Remove-AzAccount PSCommand_Logout-AzAccount PSCommand_Select-AzSubscription PSCommand_Resolve-Error PSCommand_Save-AzProfile PSCommand_Get-AzDomain PSCommand_Invoke-AzRest</keywords>
@@ -0,0 +1,52 @@
1
+ // ----------------------------------------------------------------------------------
2
+ //
3
+ // Copyright Microsoft Corporation
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ // ----------------------------------------------------------------------------------
14
+
15
+ using System;
16
+ using System.Collections.Generic;
17
+ using System.Management.Automation;
18
+
19
+ namespace Microsoft.Rest
20
+ {
21
+ public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute
22
+ {
23
+ internal string[] ResourceTypes;
24
+
25
+ public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList))
26
+ {
27
+ ResourceTypes = argumentList;
28
+ }
29
+
30
+ public static ScriptBlock CreateScriptBlock(string[] resourceTypes)
31
+ {
32
+ List<string> outputResourceTypes = new List<string>();
33
+ foreach (string resourceType in resourceTypes)
34
+ {
35
+ if (resourceType.Contains(" "))
36
+ {
37
+ outputResourceTypes.Add("\'\'" + resourceType + "\'\'");
38
+ }
39
+ else
40
+ {
41
+ outputResourceTypes.Add(resourceType);
42
+ }
43
+ }
44
+ string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'";
45
+ string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" +
46
+ String.Format("$values = {0}\n", scriptResourceTypeList) +
47
+ "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }";
48
+ ScriptBlock scriptBlock = ScriptBlock.Create(script);
49
+ return scriptBlock;
50
+ }
51
+ }
52
+ }
@@ -25,6 +25,8 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
25
25
 
26
26
  private static readonly bool IsAzure = Convert.ToBoolean(@"${$project.azure}");
27
27
 
28
+ private static string SelectedBySuffix = @"${$project.autoSwitchView? "#Multiple" : ""}";
29
+
28
30
  protected override void ProcessRecord()
29
31
  {
30
32
  try
@@ -76,7 +78,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
76
78
  Name = viewParameters.Type.FullName,
77
79
  ViewSelectedBy = new ViewSelectedBy
78
80
  {
79
- TypeName = viewParameters.Type.FullName
81
+ TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix)
80
82
  },
81
83
  TableControl = new TableControl
82
84
  {
@@ -121,6 +121,21 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
121
121
  : String.Empty;
122
122
  }
123
123
 
124
+ internal class PSArgumentCompleterOutput: ArgumentCompleterOutput
125
+ {
126
+ public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; }
127
+
128
+ public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo)
129
+ {
130
+ PSArgumentCompleterInfo = completerInfo;
131
+ }
132
+
133
+
134
+ public override string ToString() => PSArgumentCompleterInfo != null
135
+ ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}"
136
+ : String.Empty;
137
+ }
138
+
124
139
  internal class DefaultInfoOutput
125
140
  {
126
141
  public bool HasDefaultInfo { get; }
@@ -569,7 +584,9 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
569
584
 
570
585
  public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray);
571
586
 
572
- public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo);
587
+ public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo);
588
+
589
+ public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo);
573
590
 
574
591
  public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup);
575
592
 
@@ -210,6 +210,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
210
210
  HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType<ValidateNotNullAttribute>()).Any();
211
211
  HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType<AllowEmptyCollectionAttribute>()).Any();
212
212
  CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo()
213
+ ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo()
213
214
  ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo();
214
215
  DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this)
215
216
  ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this);
@@ -254,6 +255,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
254
255
  public bool SupportsWildcards { get; }
255
256
  public CompleterInfoAttribute CompleterInfoAttribute { get; }
256
257
  public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; }
258
+ public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; }
257
259
 
258
260
  public bool ValueFromPipeline { get; }
259
261
  public bool ValueFromPipelineByPropertyName { get; }
@@ -286,7 +288,8 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
286
288
  }
287
289
  SupportsWildcards = Attributes.OfType<SupportsWildcardsAttribute>().Any();
288
290
  CompleterInfoAttribute = Attributes.OfType<CompleterInfoAttribute>().FirstOrDefault();
289
- ArgumentCompleterAttribute = Attributes.OfType<ArgumentCompleterAttribute>().FirstOrDefault();
291
+ PSArgumentCompleterAttribute = Attributes.OfType<PSArgumentCompleterAttribute>().FirstOrDefault();
292
+ ArgumentCompleterAttribute = Attributes.OfType<ArgumentCompleterAttribute>().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute)));
290
293
 
291
294
  ValueFromPipeline = ParameterAttribute.ValueFromPipeline;
292
295
  ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName;
@@ -424,6 +427,16 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
424
427
  }
425
428
  }
426
429
 
430
+ internal class PSArgumentCompleterInfo: CompleterInfo
431
+ {
432
+ public string[] ResourceTypes { get; }
433
+
434
+ public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute)
435
+ {
436
+ ResourceTypes = completerAttribute.ResourceTypes;
437
+ }
438
+ }
439
+
427
440
  internal class DefaultInfo
428
441
  {
429
442
  public string Name { get; }
@@ -513,7 +526,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
513
526
 
514
527
  public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute);
515
528
  public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute);
516
-
529
+ public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute);
517
530
  public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup);
518
531
  public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup);
519
532
  }
@@ -109,6 +109,11 @@ namespace Microsoft.Rest
109
109
  Inlined
110
110
  }
111
111
 
112
+ [AttributeUsage(AttributeTargets.Property)]
113
+ public class ConstantAttribute : Attribute
114
+ {
115
+ }
116
+
112
117
  [AttributeUsage(AttributeTargets.Property)]
113
118
  public class FormatTableAttribute : Attribute
114
119
  {
@@ -13,6 +13,13 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
13
13
  {
14
14
  internal static class PsExtensions
15
15
  {
16
+ public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple")
17
+ {
18
+ var psObj = new PSObject(obj);
19
+ psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}");
20
+ return psObj;
21
+ }
22
+
16
23
  // https://stackoverflow.com/a/863944/294804
17
24
  // https://stackoverflow.com/a/4452598/294804
18
25
  // https://stackoverflow.com/a/28701974/294804
@@ -62,6 +62,56 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
62
62
  return result.ToArray();
63
63
  }
64
64
 
65
+ internal static System.Collections.Generic.List<T> SelectToList<T>(object source, System.Func<object, object> converter)
66
+ {
67
+ // null begets null
68
+ if (source == null)
69
+ {
70
+ return null;
71
+ }
72
+
73
+ // single values and strings are just encapsulated in the array.
74
+ if (source is string || !(source is System.Collections.IEnumerable))
75
+ {
76
+ try
77
+ {
78
+ return new T[] { (T)converter(source) }.ToList();
79
+ }
80
+ #if DEBUG
81
+ catch (System.Exception E)
82
+ {
83
+ System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}");
84
+ }
85
+ #else
86
+ catch
87
+ {
88
+ // silent conversion fail
89
+ }
90
+ #endif
91
+ return new T[0].ToList(); // empty result if couldn't convert.
92
+ }
93
+
94
+ var result = new System.Collections.Generic.List<T>();
95
+ foreach (var each in (System.Collections.IEnumerable)source)
96
+ {
97
+ try
98
+ {
99
+ result.Add((T)converter(each));
100
+ }
101
+ #if DEBUG
102
+ catch (System.Exception E)
103
+ {
104
+ System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}");
105
+ }
106
+ #else
107
+ catch
108
+ {
109
+ // silent conversion fail
110
+ }
111
+ #endif
112
+ }
113
+ return result;
114
+ }
65
115
  internal static System.Collections.Generic.IEnumerable<object> GetPropertyKeys<K, V>(this System.Collections.Generic.IDictionary<K, V> dictionary)
66
116
  {
67
117
  if (null != dictionary)
@@ -21,6 +21,11 @@ namespace Carbon.Json
21
21
  items = new List<JsonNode>(values);
22
22
  }
23
23
 
24
+ public XNodeArray(System.Collections.Generic.List<JsonNode> values)
25
+ {
26
+ items = new List<JsonNode>(values);
27
+ }
28
+
24
29
  public override JsonNode this[int index] => items[index];
25
30
 
26
31
  public override JsonType? ElementType => null;