Skip to content

Commit 31560c0

Browse files
authored
[Az.ApplicationInsights] Update generation tool version: autorest.powershell v3->v4 (#28242)
1 parent 696a14c commit 31560c0

File tree

114 files changed

+2297
-1436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2297
-1436
lines changed

src/ApplicationInsights/ApplicationInsights.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ApplicationInsightsManagementClient")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.3.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("2.3.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.3.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("2.3.1")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

src/ApplicationInsights/ApplicationInsights.Autorest/README.md

Lines changed: 6 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ input-file:
4646
module-version: 0.1.0
4747
subject-prefix: $(service-name)
4848

49-
identity-correction-for-post: true
50-
resourcegroup-append: true
51-
nested-object-to-string: true
52-
53-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
54-
use-extension:
55-
"@autorest/powershell": "3.x"
56-
5749
directive:
5850
- from: swagger-document
5951
where: $.info.title
@@ -403,10 +395,12 @@ directive:
403395
hide: true
404396

405397
- model-cmdlet:
406-
- WebTestGeolocation
407-
- WorkbookTemplateGallery
408-
# Hide for custom model cmdlet.
409-
# - HeaderField
398+
- model-name: WebTestGeolocation
399+
cmdlet-name: New-AzApplicationInsightsWebTestGeolocationObject
400+
- model-name: WorkbookTemplateGallery
401+
cmdlet-name: New-AzApplicationInsightsWorkbookTemplateGalleryObject
402+
- model-name: HeaderField
403+
cmdlet-name: New-AzApplicationInsightsWebTestHeaderFieldObject
410404

411405
# format output table
412406
- where:
@@ -429,109 +423,4 @@ directive:
429423
- Location
430424
- Kind
431425
- Category
432-
433-
# #breaking change message
434-
- where:
435-
verb: Get|Remove
436-
subject: ApiKey
437-
set:
438-
breaking-change:
439-
deprecated-output-properties:
440-
- LinkedReadProperty
441-
- LinkedWriteProperty
442-
new-output-properties:
443-
- LinkedReadProperty
444-
- LinkedWriteProperty
445-
change-description: The types of the properties LinkedReadProperty, LinkedWriteProperty will be changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.
446-
deprecated-by-version: 9.0.0
447-
deprecated-by-azversion: 15.0.0
448-
change-effective-date: 2025/11/03
449-
450-
- where:
451-
verb: Get|New|Update
452-
subject: MyWorkbook
453-
set:
454-
breaking-change:
455-
deprecated-output-properties:
456-
- PropertiesTag
457-
new-output-properties:
458-
- PropertiesTag
459-
change-description: The types of the properties PropertiesTag will be changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.
460-
deprecated-by-version: 9.0.0
461-
deprecated-by-azversion: 15.0.0
462-
change-effective-date: 2025/11/03
463-
464-
- where:
465-
verb: New
466-
subject: MyWorkbook|Workbook
467-
set:
468-
breaking-change:
469-
deprecated-output-properties:
470-
- IdentityType
471-
- IdentityUserAssignedIdentity
472-
new-output-properties:
473-
- EnableSystemAssignedIdentity
474-
- UserAssignedIdentity
475-
change-description: IdentityType will be removed. EnableSystemAssignedIdentity will be used to enable/disable system assigned identity and UserAssignedIdentity will be used to specify user assigned identities.
476-
deprecated-by-version: 9.0.0
477-
deprecated-by-azversion: 15.0.0
478-
change-effective-date: 2025/11/03
479-
480-
- where:
481-
verb: Get|Update
482-
subject: WebTest
483-
set:
484-
breaking-change:
485-
deprecated-output-properties:
486-
- RequestHeader
487-
- PropertiesLocations
488-
new-output-properties:
489-
- RequestHeader
490-
- PropertiesLocations
491-
change-description: The type of property 'RequestHeader' will be changed from 'Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IHeaderField' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IHeaderField]'. And the property 'PropertiesLocations' of type 'Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20220615.IWebTest' will be removed.
492-
deprecated-by-version: 9.0.0
493-
deprecated-by-azversion: 15.0.0
494-
change-effective-date: 2025/11/03
495-
496-
- where:
497-
verb: Get|New|Update
498-
subject: Workbook
499-
set:
500-
breaking-change:
501-
deprecated-output-properties:
502-
- PropertiesTag
503-
new-output-properties:
504-
- PropertiesTag
505-
change-description: The type of property 'PropertiesTag' of type 'Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20220401.IWorkbook' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.
506-
deprecated-by-version: 9.0.0
507-
deprecated-by-azversion: 15.0.0
508-
change-effective-date: 2025/11/03
509-
510-
- where:
511-
verb: Get
512-
subject: WorkbookRevision
513-
set:
514-
breaking-change:
515-
deprecated-output-properties:
516-
- PropertiesTag
517-
new-output-properties:
518-
- PropertiesTag
519-
change-description: The type of property 'PropertiesTag' of type 'Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20220401.IWorkbook' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.
520-
deprecated-by-version: 9.0.0
521-
deprecated-by-azversion: 15.0.0
522-
change-effective-date: 2025/11/03
523-
524-
- where:
525-
verb: Get|New|Update
526-
subject: WorkbookTemplate
527-
set:
528-
breaking-change:
529-
deprecated-output-properties:
530-
- Gallery
531-
new-output-properties:
532-
- Gallery
533-
change-description: The type of property 'Gallery' of type 'Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20201120.IWorkbookTemplate' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IWorkbookTemplateGallery' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IWorkbookTemplateGallery]'.
534-
deprecated-by-version: 9.0.0
535-
deprecated-by-azversion: 15.0.0
536-
change-effective-date: 2025/11/03
537426
```

src/ApplicationInsights/ApplicationInsights.Autorest/custom/Get-AzApplicationInsights.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ Returns an Application Insights component.
2222
https://learn.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsights
2323
#>
2424
function Get-AzApplicationInsights {
25-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent], [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan])]
26-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent", "15.0.0", "9.0.0", "2025/11/03", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsComponent", DeprecatedOutputProperties = ("PrivateLinkScopedResource Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IPrivateLinkScopedResource"), NewOutputProperties = ("PrivateLinkScopedResource System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IPrivateLinkScopedResource]"))]
25+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsComponent], [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan])]
2726
[CmdletBinding(DefaultParameterSetName='ListBySubscription', PositionalBinding=$false)]
2827
param(
2928
[Parameter(ParameterSetName='Get', Mandatory)]

src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSApiKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Text.RegularExpressions;
1717
using System.Linq;
1818
using System;
19-
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501;
19+
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models;
2020

2121
namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models
2222
{

src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSApplicationInsightsComponent.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
using System;
1616
using System.Collections.Generic;
1717
using System.Linq;
18-
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002;
19-
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501;
18+
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models;
2019

2120
namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models
2221
{

src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSDailyCap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501;
15+
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models;
1616

1717
namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models
1818
{

src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSDailyCapStatus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501;
15+
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models;
1616

1717
namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models
1818
{

src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSExportConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501;
15+
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models;
1616

1717
namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models
1818
{

src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSPrcingPlan.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using System.Linq;
16-
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501;
16+
using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models;
1717

1818
namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models
1919
{

src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsights.ps1

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ Note: You cannot specify a different value for InstrumentationKey nor AppId in t
2525
https://learn.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsights
2626
#>
2727
function New-AzApplicationInsights {
28-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent])]
29-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent", "15.0.0", "9.0.0", "2025/11/03", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsComponent", DeprecatedOutputProperties = ("PrivateLinkScopedResource Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IPrivateLinkScopedResource"), NewOutputProperties = ("PrivateLinkScopedResource System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IPrivateLinkScopedResource]"))]
28+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsComponent])]
3029
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3130
param(
3231
[Parameter(Mandatory)]
@@ -54,7 +53,7 @@ function New-AzApplicationInsights {
5453
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
5554
[System.String]
5655
[Alias("ApplicationKind")]
57-
[ValidateSet("web", "other", "nodejs", "java", "ios", "store", "phone", IgnoreCase)]
56+
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.PSArgumentCompleterAttribute("web", "other", "nodejs", "java", "ios", "store", "phone", "IgnoreCase")]
5857
# The kind of application that this component refers to, used to customize UI.
5958
# This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone.
6059
${Kind},
@@ -66,9 +65,9 @@ function New-AzApplicationInsights {
6665
${Location},
6766

6867
[Parameter()]
69-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.ApplicationType])]
68+
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.PSArgumentCompleterAttribute("web", "other")]
7069
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
71-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.ApplicationType]
70+
[System.String]
7271
# Type of application being monitored.
7372
${ApplicationType},
7473

@@ -91,9 +90,9 @@ function New-AzApplicationInsights {
9190
${Etag},
9291

9392
[Parameter()]
94-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.FlowType])]
93+
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.PSArgumentCompleterAttribute("Bluefield")]
9594
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
96-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.FlowType]
95+
[System.String]
9796
# Used by the Application Insights system to determine what kind of flow this component was created by.
9897
# This is to be set to 'Bluefield' when creating/updating a component via the REST API.
9998
${FlowType},
@@ -108,6 +107,7 @@ function New-AzApplicationInsights {
108107
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
109108
[System.String]
110109
# The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp.
110+
# Please visit external url https://aka.ms/ewjuel to get more information.
111111
${HockeyAppId},
112112

113113
[Parameter()]
@@ -117,30 +117,30 @@ function New-AzApplicationInsights {
117117
${ImmediatePurgeDataOn30Day},
118118

119119
[Parameter()]
120-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.IngestionMode])]
120+
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.PSArgumentCompleterAttribute("ApplicationInsights", "ApplicationInsightsWithDiagnosticSettings", "LogAnalytics")]
121121
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
122-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.IngestionMode]
122+
[System.String]
123123
# Indicates the flow of the ingestion.
124124
${IngestionMode},
125125

126126
[Parameter()]
127-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType])]
127+
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.PSArgumentCompleterAttribute("Enabled", "Disabled")]
128128
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
129-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType]
129+
[System.String]
130130
# The network access type for accessing Application Insights ingestion.
131131
${PublicNetworkAccessForIngestion},
132132

133133
[Parameter()]
134-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType])]
134+
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.PSArgumentCompleterAttribute("Enabled", "Disabled")]
135135
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
136-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType]
136+
[System.String]
137137
# The network access type for accessing Application Insights query.
138138
${PublicNetworkAccessForQuery},
139139

140140
[Parameter()]
141-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.RequestSource])]
141+
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.PSArgumentCompleterAttribute("rest")]
142142
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
143-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.RequestSource]
143+
[System.String]
144144
# Describes what tool created this Application Insights component.
145145
# Customers using this API should set this to the default 'rest'.
146146
${RequestSource},
@@ -155,12 +155,13 @@ function New-AzApplicationInsights {
155155
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
156156
[System.Double]
157157
# Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry.
158+
# Please visit external url https://aka.ms/sl0yqd to get more information.
158159
${SamplingPercentage},
159160

160161
[Parameter()]
161162
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')]
162163
[Alias("Tags")]
163-
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IComponentsResourceTags]))]
164+
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IComponentsResourceTags]))]
164165
[System.Collections.Hashtable]
165166
# Resource tags
166167
${Tag},
@@ -178,7 +179,8 @@ function New-AzApplicationInsights {
178179
[ValidateNotNull()]
179180
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')]
180181
[System.Management.Automation.PSObject]
181-
# The credentials, account, tenant, and subscription used for communication with Azure.
182+
# The DefaultProfile parameter is not functional.
183+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
182184
${DefaultProfile},
183185

184186
[Parameter(DontShow)]

0 commit comments

Comments
 (0)