Skip to content

Commit

Permalink
Migrate ApplicationInsights from generation to main (#24446)
Browse files Browse the repository at this point in the history
* Move ApplicationInsights to main

* Update ChangeLog.md

* Update Get-AzApplicationInsightsWorkbookRevision.md

* Update Get-AzApplicationInsightsWorkbookRevision.md

---------

Co-authored-by: Vincent Dai <23257217+vidai-msft@users.noreply.github.com>
  • Loading branch information
azure-powershell-bot and vidai-msft authored Mar 23, 2024
1 parent dda4ec4 commit df869f2
Show file tree
Hide file tree
Showing 46 changed files with 1,104 additions and 712 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This directory contains the PowerShell module for the ApplicationInsights service.

---

## Info
- Modifiable: yes
- Generated: all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,38 @@ function Update-AzApplicationInsights {
)

process {
# add PS bound parameters to run test
$EnvPSBoundParameters = @{}
if ($PSBoundParameters.ContainsKey('Debug')) {
$EnvPSBoundParameters['Debug'] = $Debug
}
if ($PSBoundParameters.ContainsKey('HttpPipelineAppend')) {
$EnvPSBoundParameters['HttpPipelineAppend'] = $HttpPipelineAppend
}
if ($PSBoundParameters.ContainsKey('HttpPipelinePrepend')) {
$EnvPSBoundParameters['HttpPipelinePrepend'] = $HttpPipelinePrepend
}
if ($PSBoundParameters.ContainsKey('Proxy')) {
$EnvPSBoundParameters['Proxy'] = $Proxy
}
if ($PSBoundParameters.ContainsKey('ProxyCredential')) {
$EnvPSBoundParameters['ProxyCredential'] = $ProxyCredential
}
if ($PSBoundParameters.ContainsKey('ProxyUseDefaultCredentials')) {
$EnvPSBoundParameters['ProxyUseDefaultCredentials'] = $ProxyUseDefaultCredentials
}
if ($PSBoundParameters.ContainsKey('SubscriptionId')) {
$EnvPSBoundParameters['SubscriptionId'] = $SubscriptionId
}
if ($PSBoundParameters.ContainsKey('ResourceGroupName')) {
$EnvPSBoundParameters['ResourceGroupName'] = $ResourceGroupName
}
if ($PSBoundParameters.ContainsKey('Name')) {
$EnvPSBoundParameters['Name'] = $Name
}

try {
$component = . Get-AzApplicationInsights -SubscriptionId $PSBoundParameters["SubscriptionId"] -ResourceGroupName $PSBoundParameters["ResourceGroupName"] -Name $PSBoundParameters["Name"]
$component = . Get-AzApplicationInsights @EnvPSBoundParameters
} catch {
Write-Warning "component $($PSBoundParameters['Name']) is not existed in Resource Group $($PSBoundParameters["ResourceGroupName"])"
return
Expand Down Expand Up @@ -258,7 +288,7 @@ function Update-AzApplicationInsights {
$PSBoundParameters["SamplingPercentage"] = $component.SamplingPercentage
}
if (!$PSBoundParameters.ContainsKey("Tag") -and ($null -ne $component.Tag)) {
$PSBoundParameters["Tag"] = [System.Collections.Hashtable]$component.Tag.AddtionalProperties
$PSBoundParameters["Tag"] = [System.Collections.Hashtable]$component.Tag.AdditionalProperties
}
if (!$PSBoundParameters.ContainsKey("WorkspaceResourceId") -and ![System.String]::IsNullOrEmpty($component.WorkspaceResourceId)) {
$PSBoundParameters["WorkspaceResourceId"] = $component.WorkspaceResourceId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5855,7 +5855,7 @@ public partial class ApplicationInsightsManagementClient
+ "?"
+ "category=" + global::System.Uri.EscapeDataString(category)
+ "&"
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty)
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty)
+ "&"
+ (string.IsNullOrEmpty(sourceId) ? global::System.String.Empty : "sourceId=" + global::System.Uri.EscapeDataString(sourceId))
+ "&"
Expand Down Expand Up @@ -5921,7 +5921,7 @@ public partial class ApplicationInsightsManagementClient
+ "?"
+ "category=" + global::System.Uri.EscapeDataString(category)
+ "&"
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty)
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty)
+ "&"
+ (string.IsNullOrEmpty(sourceId) ? global::System.String.Empty : "sourceId=" + global::System.Uri.EscapeDataString(sourceId))
+ "&"
Expand Down Expand Up @@ -6050,7 +6050,7 @@ public partial class ApplicationInsightsManagementClient
+ "?"
+ "category=" + global::System.Uri.EscapeDataString(category)
+ "&"
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty)
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty)
+ "&"
+ (null == canFetchContent ? global::System.String.Empty : "canFetchContent=" + global::System.Uri.EscapeDataString(canFetchContent.ToString()))
+ "&"
Expand Down Expand Up @@ -6108,7 +6108,7 @@ public partial class ApplicationInsightsManagementClient
+ "?"
+ "category=" + global::System.Uri.EscapeDataString(category)
+ "&"
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty)
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty)
+ "&"
+ (null == canFetchContent ? global::System.String.Empty : "canFetchContent=" + global::System.Uri.EscapeDataString(canFetchContent.ToString()))
+ "&"
Expand Down Expand Up @@ -9168,7 +9168,7 @@ public partial class ApplicationInsightsManagementClient
+ "?"
+ "category=" + global::System.Uri.EscapeDataString(category)
+ "&"
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty)
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty)
+ "&"
+ (string.IsNullOrEmpty(sourceId) ? global::System.String.Empty : "sourceId=" + global::System.Uri.EscapeDataString(sourceId))
+ "&"
Expand Down Expand Up @@ -9232,7 +9232,7 @@ public partial class ApplicationInsightsManagementClient
+ "?"
+ "category=" + global::System.Uri.EscapeDataString(category)
+ "&"
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty)
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty)
+ "&"
+ (string.IsNullOrEmpty(sourceId) ? global::System.String.Empty : "sourceId=" + global::System.Uri.EscapeDataString(sourceId))
+ "&"
Expand Down Expand Up @@ -9361,7 +9361,7 @@ public partial class ApplicationInsightsManagementClient
+ "?"
+ "category=" + global::System.Uri.EscapeDataString(category)
+ "&"
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty)
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty)
+ "&"
+ (null == canFetchContent ? global::System.String.Empty : "canFetchContent=" + global::System.Uri.EscapeDataString(canFetchContent.ToString()))
+ "&"
Expand Down Expand Up @@ -9419,7 +9419,7 @@ public partial class ApplicationInsightsManagementClient
+ "?"
+ "category=" + global::System.Uri.EscapeDataString(category)
+ "&"
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty)
+ (null != tags && tags.Length > 0 ? "tags=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(tags, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty)
+ "&"
+ (null == canFetchContent ? global::System.String.Empty : "canFetchContent=" + global::System.Uri.EscapeDataString(canFetchContent.ToString()))
+ "&"
Expand Down
Loading

0 comments on commit df869f2

Please sign in to comment.