Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.ApplicationInsights.private.dll'
FormatsToProcess = './Az.ApplicationInsights.format.ps1xml'
FunctionsToExport = 'Get-AzApplicationInsights', 'Get-AzApplicationInsightsApiKey', 'Get-AzApplicationInsightsContinuousExport', 'Get-AzApplicationInsightsLinkedStorageAccount', 'Get-AzApplicationInsightsMyWorkbook', 'Get-AzApplicationInsightsWebTest', 'Get-AzApplicationInsightsWorkbook', 'Get-AzApplicationInsightsWorkbookRevision', 'Get-AzApplicationInsightsWorkbookTemplate', 'New-AzApplicationInsights', 'New-AzApplicationInsightsApiKey', 'New-AzApplicationInsightsContinuousExport', 'New-AzApplicationInsightsLinkedStorageAccount', 'New-AzApplicationInsightsMyWorkbook', 'New-AzApplicationInsightsWebTest', 'New-AzApplicationInsightsWebTestGeolocationObject', 'New-AzApplicationInsightsWebTestHeaderFieldObject', 'New-AzApplicationInsightsWorkbook', 'New-AzApplicationInsightsWorkbookTemplate', 'New-AzApplicationInsightsWorkbookTemplateGalleryObject', 'Remove-AzApplicationInsights', 'Remove-AzApplicationInsightsApiKey', 'Remove-AzApplicationInsightsContinuousExport', 'Remove-AzApplicationInsightsLinkedStorageAccount', 'Remove-AzApplicationInsightsMyWorkbook', 'Remove-AzApplicationInsightsWebTest', 'Remove-AzApplicationInsightsWorkbook', 'Remove-AzApplicationInsightsWorkbookTemplate', 'Set-AzApplicationInsightsContinuousExport', 'Set-AzApplicationInsightsDailyCap', 'Set-AzApplicationInsightsPricingPlan', 'Update-AzApplicationInsights', 'Update-AzApplicationInsightsLinkedStorageAccount', 'Update-AzApplicationInsightsMyWorkbook', 'Update-AzApplicationInsightsWebTestTag', 'Update-AzApplicationInsightsWorkbook', 'Update-AzApplicationInsightsWorkbookTemplate', '*'
AliasesToExport = '*'
FunctionsToExport = 'Get-AzApplicationInsights', 'Get-AzApplicationInsightsApiKey', 'Get-AzApplicationInsightsContinuousExport', 'Get-AzApplicationInsightsLinkedStorageAccount', 'Get-AzApplicationInsightsMyWorkbook', 'Get-AzApplicationInsightsWebTest', 'Get-AzApplicationInsightsWorkbook', 'Get-AzApplicationInsightsWorkbookRevision', 'Get-AzApplicationInsightsWorkbookTemplate', 'New-AzApplicationInsights', 'New-AzApplicationInsightsApiKey', 'New-AzApplicationInsightsContinuousExport', 'New-AzApplicationInsightsLinkedStorageAccount', 'New-AzApplicationInsightsMyWorkbook', 'New-AzApplicationInsightsWebTest', 'New-AzApplicationInsightsWebTestGeolocationObject', 'New-AzApplicationInsightsWebTestHeaderFieldObject', 'New-AzApplicationInsightsWorkbook', 'New-AzApplicationInsightsWorkbookTemplate', 'New-AzApplicationInsightsWorkbookTemplateGalleryObject', 'Remove-AzApplicationInsights', 'Remove-AzApplicationInsightsApiKey', 'Remove-AzApplicationInsightsContinuousExport', 'Remove-AzApplicationInsightsLinkedStorageAccount', 'Remove-AzApplicationInsightsMyWorkbook', 'Remove-AzApplicationInsightsWebTest', 'Remove-AzApplicationInsightsWorkbook', 'Remove-AzApplicationInsightsWorkbookTemplate', 'Set-AzApplicationInsightsContinuousExport', 'Set-AzApplicationInsightsDailyCap', 'Set-AzApplicationInsightsPricingPlan', 'Update-AzApplicationInsights', 'Update-AzApplicationInsightsLinkedStorageAccount', 'Update-AzApplicationInsightsMyWorkbook', 'Update-AzApplicationInsightsWebTestTag', 'Update-AzApplicationInsightsWorkbook', 'Update-AzApplicationInsightsWorkbookTemplate'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ApplicationInsights'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ApplicationInsightsManagementClient")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.3.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.3.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.3.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.3.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'

if(-not $Isolated) {
if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Get-AzApplicationInsights -ResourceGroupName "testgroup" -Name "test" -IncludePr
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent
Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsComponent
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan
.Notes
COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

INPUTOBJECT <IApplicationInsightsIdentity>: Identity Parameter
INPUTOBJECT <IApplicationInsightsIdentity>: Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
[AnnotationId <String>]: The unique annotation ID. This is unique within a Application Insights component.
[ComponentName <String>]: The name of the Application Insights component resource.
[ExportId <String>]: The Continuous Export configuration ID. This is unique within a Application Insights component.
Expand All @@ -45,14 +45,14 @@ INPUTOBJECT <IApplicationInsightsIdentity>: Identity Parameter
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
[ResourceName <String>]: The name of the Application Insights component resource.
[RevisionId <String>]: The id of the workbook's revision.
[StorageType <StorageType?>]: The type of the Application Insights component data source for the linked storage account.
[StorageType <String>]: The type of the Application Insights component data source for the linked storage account.
[SubscriptionId <String>]: The ID of the target subscription.
[WebTestName <String>]: The name of the Application Insights WebTest resource.
.Link
https://learn.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsights
#>
function Get-AzApplicationInsights {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent], [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsComponent], [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan])]
[CmdletBinding(DefaultParameterSetName='ListBySubscription', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='ListBySubscription')]
Expand Down Expand Up @@ -154,6 +154,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName

$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }

$context = Get-AzContext
if (-not $context -and -not $testPlayback) {
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
exit
}

if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
Expand All @@ -179,9 +188,7 @@ begin {
GetByResourceId = 'Az.ApplicationInsights.custom\Get-AzApplicationInsights';
GetByInputObject = 'Az.ApplicationInsights.custom\Get-AzApplicationInsights';
}
if (('ListBySubscription', 'ListByResourceGroupName', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if (('ListBySubscription', 'ListByResourceGroupName', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
Expand All @@ -195,6 +202,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
if ($wrappedCmd -eq $null) {
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
}
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,26 @@ Get-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" -Api
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentApiKey
Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsComponentApiKey
.Notes
COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

COMPONENTINPUTOBJECT <IApplicationInsightsIdentity>: Identity Parameter
[AnnotationId <String>]: The unique annotation ID. This is unique within a Application Insights component.
[ComponentName <String>]: The name of the Application Insights component resource.
[ExportId <String>]: The Continuous Export configuration ID. This is unique within a Application Insights component.
[Id <String>]: Resource identity path
[KeyId <String>]: The API Key ID. This is unique within a Application Insights component.
[PurgeId <String>]: In a purge status request, this is the Id of the operation the status of which is returned.
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
[ResourceName <String>]: The name of the Application Insights component resource.
[RevisionId <String>]: The id of the workbook's revision.
[StorageType <String>]: The type of the Application Insights component data source for the linked storage account.
[SubscriptionId <String>]: The ID of the target subscription.
[WebTestName <String>]: The name of the Application Insights WebTest resource.

INPUTOBJECT <IApplicationInsightsIdentity>: Identity Parameter
[AnnotationId <String>]: The unique annotation ID. This is unique within a Application Insights component.
[ComponentName <String>]: The name of the Application Insights component resource.
Expand All @@ -43,17 +57,18 @@ INPUTOBJECT <IApplicationInsightsIdentity>: Identity Parameter
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
[ResourceName <String>]: The name of the Application Insights component resource.
[RevisionId <String>]: The id of the workbook's revision.
[StorageType <StorageType?>]: The type of the Application Insights component data source for the linked storage account.
[StorageType <String>]: The type of the Application Insights component data source for the linked storage account.
[SubscriptionId <String>]: The ID of the target subscription.
[WebTestName <String>]: The name of the Application Insights WebTest resource.
.Link
https://learn.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsightsapikey
#>
function Get-AzApplicationInsightsApiKey {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentApiKey])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsComponentApiKey])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
[Parameter(ParameterSetName='GetViaIdentityComponent', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')]
[System.String]
# The API Key ID.
Expand Down Expand Up @@ -88,9 +103,14 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity]
# Identity Parameter
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},

[Parameter(ParameterSetName='GetViaIdentityComponent', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity]
# Identity Parameter
${ComponentInputObject},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
Expand Down Expand Up @@ -147,6 +167,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName

$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }

$context = Get-AzContext
if (-not $context -and -not $testPlayback) {
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
exit
}

if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
Expand All @@ -168,11 +197,10 @@ begin {
$mapping = @{
Get = 'Az.ApplicationInsights.private\Get-AzApplicationInsightsApiKey_Get';
GetViaIdentity = 'Az.ApplicationInsights.private\Get-AzApplicationInsightsApiKey_GetViaIdentity';
GetViaIdentityComponent = 'Az.ApplicationInsights.private\Get-AzApplicationInsightsApiKey_GetViaIdentityComponent';
List = 'Az.ApplicationInsights.private\Get-AzApplicationInsightsApiKey_List';
}
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
Expand All @@ -186,6 +214,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
if ($wrappedCmd -eq $null) {
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
}
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
Expand Down
Loading