diff --git a/src/ApplicationInsights/ApplicationInsights.sln b/src/ApplicationInsights/ApplicationInsights.sln index 0a07751b56a5..0ebc5d15a46c 100644 --- a/src/ApplicationInsights/ApplicationInsights.sln +++ b/src/ApplicationInsights/ApplicationInsights.sln @@ -3,17 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{1625AD17-DDE6-4E3D-8124-D2326AEC2A7A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{7E3FEA03-4F54-4AE2-B678-A3FF26CBF753}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{4DF7B7D5-CC89-4D38-AD4E-6FC0F480F068}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{43DCE324-743F-44AD-A380-E57208168AC3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{8E2987C0-09B0-41DB-A1A2-7FD3F4D021C3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{FF66413F-453E-425D-B003-79C16A4C2CBB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{13D2CAE7-AD3B-475D-8B60-26CDCCDEED67}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{48452AD8-CFFD-4B08-8A53-C295E5721AA9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{6D2AE481-CB85-4882-8AF7-B93B7FEC7451}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{0E79D346-6BD1-4000-95E1-AAFB2E70B8A5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ApplicationInsights", "Az.ApplicationInsights.csproj", "{2243E46B-2C05-4FA0-AC0B-EFD5DA24E20D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{9A370B7D-04F3-4DA4-A81B-0CBE696E8F4A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ApplicationInsights", "Az.ApplicationInsights.csproj", "{371A62A3-148D-42BD-95EE-DCD05A003DF0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -24,29 +26,33 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1625AD17-DDE6-4E3D-8124-D2326AEC2A7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1625AD17-DDE6-4E3D-8124-D2326AEC2A7A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1625AD17-DDE6-4E3D-8124-D2326AEC2A7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1625AD17-DDE6-4E3D-8124-D2326AEC2A7A}.Release|Any CPU.Build.0 = Release|Any CPU - {4DF7B7D5-CC89-4D38-AD4E-6FC0F480F068}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4DF7B7D5-CC89-4D38-AD4E-6FC0F480F068}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4DF7B7D5-CC89-4D38-AD4E-6FC0F480F068}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4DF7B7D5-CC89-4D38-AD4E-6FC0F480F068}.Release|Any CPU.Build.0 = Release|Any CPU - {8E2987C0-09B0-41DB-A1A2-7FD3F4D021C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E2987C0-09B0-41DB-A1A2-7FD3F4D021C3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E2987C0-09B0-41DB-A1A2-7FD3F4D021C3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E2987C0-09B0-41DB-A1A2-7FD3F4D021C3}.Release|Any CPU.Build.0 = Release|Any CPU - {13D2CAE7-AD3B-475D-8B60-26CDCCDEED67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {13D2CAE7-AD3B-475D-8B60-26CDCCDEED67}.Debug|Any CPU.Build.0 = Debug|Any CPU - {13D2CAE7-AD3B-475D-8B60-26CDCCDEED67}.Release|Any CPU.ActiveCfg = Release|Any CPU - {13D2CAE7-AD3B-475D-8B60-26CDCCDEED67}.Release|Any CPU.Build.0 = Release|Any CPU - {6D2AE481-CB85-4882-8AF7-B93B7FEC7451}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6D2AE481-CB85-4882-8AF7-B93B7FEC7451}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6D2AE481-CB85-4882-8AF7-B93B7FEC7451}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6D2AE481-CB85-4882-8AF7-B93B7FEC7451}.Release|Any CPU.Build.0 = Release|Any CPU - {2243E46B-2C05-4FA0-AC0B-EFD5DA24E20D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2243E46B-2C05-4FA0-AC0B-EFD5DA24E20D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2243E46B-2C05-4FA0-AC0B-EFD5DA24E20D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2243E46B-2C05-4FA0-AC0B-EFD5DA24E20D}.Release|Any CPU.Build.0 = Release|Any CPU + {7E3FEA03-4F54-4AE2-B678-A3FF26CBF753}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E3FEA03-4F54-4AE2-B678-A3FF26CBF753}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E3FEA03-4F54-4AE2-B678-A3FF26CBF753}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E3FEA03-4F54-4AE2-B678-A3FF26CBF753}.Release|Any CPU.Build.0 = Release|Any CPU + {43DCE324-743F-44AD-A380-E57208168AC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43DCE324-743F-44AD-A380-E57208168AC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43DCE324-743F-44AD-A380-E57208168AC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43DCE324-743F-44AD-A380-E57208168AC3}.Release|Any CPU.Build.0 = Release|Any CPU + {FF66413F-453E-425D-B003-79C16A4C2CBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF66413F-453E-425D-B003-79C16A4C2CBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF66413F-453E-425D-B003-79C16A4C2CBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF66413F-453E-425D-B003-79C16A4C2CBB}.Release|Any CPU.Build.0 = Release|Any CPU + {48452AD8-CFFD-4B08-8A53-C295E5721AA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48452AD8-CFFD-4B08-8A53-C295E5721AA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48452AD8-CFFD-4B08-8A53-C295E5721AA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48452AD8-CFFD-4B08-8A53-C295E5721AA9}.Release|Any CPU.Build.0 = Release|Any CPU + {0E79D346-6BD1-4000-95E1-AAFB2E70B8A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E79D346-6BD1-4000-95E1-AAFB2E70B8A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E79D346-6BD1-4000-95E1-AAFB2E70B8A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E79D346-6BD1-4000-95E1-AAFB2E70B8A5}.Release|Any CPU.Build.0 = Release|Any CPU + {9A370B7D-04F3-4DA4-A81B-0CBE696E8F4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A370B7D-04F3-4DA4-A81B-0CBE696E8F4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A370B7D-04F3-4DA4-A81B-0CBE696E8F4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A370B7D-04F3-4DA4-A81B-0CBE696E8F4A}.Release|Any CPU.Build.0 = Release|Any CPU + {371A62A3-148D-42BD-95EE-DCD05A003DF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {371A62A3-148D-42BD-95EE-DCD05A003DF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {371A62A3-148D-42BD-95EE-DCD05A003DF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {371A62A3-148D-42BD-95EE-DCD05A003DF0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/ApplicationInsights/Az.ApplicationInsights.psd1 b/src/ApplicationInsights/Az.ApplicationInsights.psd1 index c11c9474a5d0..76478a7c55c7 100644 --- a/src/ApplicationInsights/Az.ApplicationInsights.psd1 +++ b/src/ApplicationInsights/Az.ApplicationInsights.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 1/6/2023 +# Generated on: 1/30/2023 # @{ @@ -141,7 +141,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = '* Enabled output object enumerating for ''Get-AzApplicationInsights'' [#20225]' + # ReleaseNotes = '' # Prerelease string of this module # Prerelease = '' diff --git a/src/ApplicationInsights/Az.ApplicationInsights.psm1 b/src/ApplicationInsights/Az.ApplicationInsights.psm1 index f4d0f233bbd4..290d92635c35 100644 --- a/src/ApplicationInsights/Az.ApplicationInsights.psm1 +++ b/src/ApplicationInsights/Az.ApplicationInsights.psm1 @@ -33,7 +33,7 @@ } if(-not $accountsModule) { - Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } diff --git a/src/ApplicationInsights/ChangeLog.md b/src/ApplicationInsights/ChangeLog.md index 8beb2c3a0c64..b978dce7d993 100644 --- a/src/ApplicationInsights/ChangeLog.md +++ b/src/ApplicationInsights/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Added parameter validation for `Get-AzApplicationInsights` [#20697 ] ## Version 2.2.1 * Enabled output object enumerating for `Get-AzApplicationInsights` [#20225] diff --git a/src/ApplicationInsights/custom/Models/PSApplicationInsightsComponent.cs b/src/ApplicationInsights/custom/Models/PSApplicationInsightsComponent.cs index 0686c675df5c..c24c989e9e86 100644 --- a/src/ApplicationInsights/custom/Models/PSApplicationInsightsComponent.cs +++ b/src/ApplicationInsights/custom/Models/PSApplicationInsightsComponent.cs @@ -24,30 +24,30 @@ public class PSApplicationInsightsComponent { public PSApplicationInsightsComponent(ApplicationInsightsComponent component) { - this.ResourceGroupName = ParseResourceGroupFromId(component.Id); - this.Name = component.Name; - this.Id = component.Id; - this.Location = component.Location; - this.Tags = component.Tag.Keys.ToDictionary(x => x, x => component.Tag[x]); - this.Kind = component.Kind; - this.Type = component.Type; - this.AppId = component.AppId; - this.ApplicationId = component.ApplicationId; - this.ApplicationType = component.ApplicationType; - this.CreationDate = component.CreationDate; - this.FlowType = component.FlowType; - this.HockeyAppId = component.HockeyAppId; - this.HockeyAppToken = component.HockeyAppToken; - this.InstrumentationKey = component.InstrumentationKey; - this.ProvisioningState = component.ProvisioningState; - this.RequestSource = component.RequestSource; - this.SamplingPercentage = component.SamplingPercentage; - this.TenantId = component.TenantId; - this.PublicNetworkAccessForIngestion = component.PublicNetworkAccessForIngestion; - this.PublicNetworkAccessForQuery = component.PublicNetworkAccessForQuery; - this.PrivateLinkScopedResources = component.PrivateLinkScopedResource.ToList(); - this.RetentionInDays = component.RetentionInDay; - this.ConnectionString = component.ConnectionString; + this.ResourceGroupName = ParseResourceGroupFromId(component?.Id); + this.Name = component?.Name; + this.Id = component?.Id; + this.Location = component?.Location; + this.Tags = component?.Tag?.Keys?.ToDictionary(x => x, x => component.Tag[x]); + this.Kind = component?.Kind; + this.Type = component?.Type; + this.AppId = component?.AppId; + this.ApplicationId = component?.ApplicationId; + this.ApplicationType = component?.ApplicationType; + this.CreationDate = component?.CreationDate; + this.FlowType = component?.FlowType; + this.HockeyAppId = component?.HockeyAppId; + this.HockeyAppToken = component?.HockeyAppToken; + this.InstrumentationKey = component?.InstrumentationKey; + this.ProvisioningState = component?.ProvisioningState; + this.RequestSource = component?.RequestSource; + this.SamplingPercentage = component?.SamplingPercentage; + this.TenantId = component?.TenantId; + this.PublicNetworkAccessForIngestion = component?.PublicNetworkAccessForIngestion; + this.PublicNetworkAccessForQuery = component?.PublicNetworkAccessForQuery; + this.PrivateLinkScopedResources = component?.PrivateLinkScopedResource?.ToList(); + this.RetentionInDays = component?.RetentionInDay; + this.ConnectionString = component?.ConnectionString; } public string Id { get; set; } @@ -145,7 +145,7 @@ public PSApplicationInsightsComponentWithPricingPlan(ApplicationInsightsComponen ApplicationInsightsComponentQuotaStatus status) : base(component) { - if (billing.CurrentBillingFeature.Any(f => f.Contains("Enterprise"))) + if (billing != null && billing.CurrentBillingFeature != null && billing.CurrentBillingFeature.Any(f => f.Contains("Enterprise"))) { this.PricingPlan = "Application Insights Enterprise"; } @@ -154,11 +154,13 @@ public PSApplicationInsightsComponentWithPricingPlan(ApplicationInsightsComponen this.PricingPlan = billing.CurrentBillingFeature.FirstOrDefault(); } - this.Cap = billing.DataVolumeCap.Cap; - this.ResetTime = billing.DataVolumeCap.ResetTime; - this.StopSendNotificationWhenHitCap = billing.DataVolumeCap.StopSendNotificationWhenHitCap.Value; - this.CapExpirationTime = status.ExpirationTime; - this.IsCapped = status.ShouldBeThrottled != null ? status.ShouldBeThrottled.Value : false; + this.Cap = billing?.DataVolumeCap?.Cap; + this.ResetTime = billing?.DataVolumeCap?.ResetTime; + if (billing != null && billing.DataVolumeCap != null && billing.DataVolumeCap.StopSendNotificationWhenHitCap != null) { + this.StopSendNotificationWhenHitCap = billing.DataVolumeCap.StopSendNotificationWhenHitCap.Value; + } + this.CapExpirationTime = status?.ExpirationTime; + this.IsCapped = status?.ShouldBeThrottled != null ? status.ShouldBeThrottled.Value : false; } } } \ No newline at end of file diff --git a/src/ApplicationInsights/custom/README.md b/src/ApplicationInsights/custom/README.md index 06c36c0b77c6..618e5ec73008 100644 --- a/src/ApplicationInsights/custom/README.md +++ b/src/ApplicationInsights/custom/README.md @@ -32,7 +32,7 @@ These provide functionality to our HTTP pipeline and other useful features. In s ### Attributes For processing the cmdlets, we've created some additional attributes: - `Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.DescriptionAttribute` - - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. - `Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.DoNotExportAttribute` - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ApplicationInsights`. - `Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.InternalExportAttribute` diff --git a/src/ApplicationInsights/exports/README.md b/src/ApplicationInsights/exports/README.md index d8473f03c8e5..cc3ad992af93 100644 --- a/src/ApplicationInsights/exports/README.md +++ b/src/ApplicationInsights/exports/README.md @@ -1,5 +1,5 @@ # Exports -This directory contains the cmdlets *exported by* `Az.ApplicationInsights`. No other cmdlets in this repository are directly exported. What that means is the `Az.ApplicationInsights` module will run [Export-ModuleMember](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. +This directory contains the cmdlets *exported by* `Az.ApplicationInsights`. No other cmdlets in this repository are directly exported. What that means is the `Az.ApplicationInsights` module will run [Export-ModuleMember](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. ## Info - Modifiable: no diff --git a/src/ApplicationInsights/generate-info.json b/src/ApplicationInsights/generate-info.json index 55280fa0c137..db68fb1d287b 100644 --- a/src/ApplicationInsights/generate-info.json +++ b/src/ApplicationInsights/generate-info.json @@ -1,8 +1,8 @@ { - "swagger_commit": "f3e7c1b20f032a637069d055524549b950830c22", + "swagger_commit": "90a294fca4845153be79d926b7415be5375522ac", "node": "v14.15.5", "autorest": "`-- (empty)", - "autorest_core": "3.9.3", + "autorest_core": "3.9.4", "autorest_modelerfour": "4.15.414", "autorest_powershell": "3.0.498" } diff --git a/src/ApplicationInsights/how-to.md b/src/ApplicationInsights/how-to.md index 736bf259c995..cd740226a984 100644 --- a/src/ApplicationInsights/how-to.md +++ b/src/ApplicationInsights/how-to.md @@ -14,7 +14,7 @@ To generate documentation, the process is now integrated into the `build-module. To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. ## Packing `Az.ApplicationInsights` -To pack `Az.ApplicationInsights` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. +To pack `Az.ApplicationInsights` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://docs.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. ## Module Script Details There are multiple scripts created for performing different actions for developing `Az.ApplicationInsights`. diff --git a/src/ApplicationInsights/internal/README.md b/src/ApplicationInsights/internal/README.md index e8f378bb8025..77829e2688c6 100644 --- a/src/ApplicationInsights/internal/README.md +++ b/src/ApplicationInsights/internal/README.md @@ -8,7 +8,7 @@ This directory contains a module to handle *internal only* cmdlets. Cmdlets that - Packaged: yes ## Details -The `Az.ApplicationInsights.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.ApplicationInsights`. Instead, this sub-module is imported by the `..\custom\Az.ApplicationInsights.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.ApplicationInsights.internal\Get-Example` would call an internal cmdlet named `Get-Example`. +The `Az.ApplicationInsights.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.ApplicationInsights`. Instead, this sub-module is imported by the `..\custom\Az.ApplicationInsights.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.ApplicationInsights.internal\Get-Example` would call an internal cmdlet named `Get-Example`. ## Purpose This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.ApplicationInsights`.