您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.
New-AzApplicationInsights
Create a new application insights resource
Syntax
New-AzApplicationInsights
[-ResourceGroupName] <String>
[-Name] <String>
[-Location] <String>
[-Kind <String>]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[[-RetentionInDays] <Int32>]
[[-PublicNetworkAccessForIngestion] <String>]
[[-PublicNetworkAccessForQuery] <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create a new application insights resource
Examples
Example 1 Create a new application insights resource
PS C:\> New-AzApplicationInsights -Kind java -ResourceGroupName testgroup -Name test1027 -location eastus
Id : /subscriptions/{subid}/resourceGroups/testgroup/providers/microsoft.insights/components/test1027
ResourceGroupName : testgroup
Name : test1027
Kind : web
Location : eastus
Type : microsoft.insights/components
AppId : 8323fb13-32aa-46af-b467-8355cf4f8f98
ApplicationType : web
Tags : {}
CreationDate : 10/27/2017 4:56:40 PM
FlowType :
HockeyAppId :
HockeyAppToken :
InstrumentationKey : 083112ed-ed9b-464e-a9b0-8cf126fbfced
ProvisioningState : Succeeded
RequestSource : AzurePowerShell
SamplingPercentage :
TenantId : {subid}
PublicNetworkAccessForIngestion : Enabled
PublicNetworkAccessForQuery : Enabled
PrivateLinkScopedResources :
Add a new application insights resource named as "test" in resource group "testgroup" with kind "java"
Parameters
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
Type: | Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Application kind.
Type: | String |
Aliases: | ApplicationKind |
Accepted values: | web, other, Node.js, java |
Position: | Named |
Default value: | web |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Application Insights Resource Location.
Type: | String |
Position: | 2 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Application Insights Resource Name.
Type: | String |
Aliases: | ApplicationInsightsComponentName, ComponentName |
Position: | 1 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The network access type for accessing Application Insights ingestion. Value should be 'Enabled' or 'Disabled'
Type: | String |
Position: | 4 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The network access type for accessing Application Insights query. Value should be 'Enabled' or 'Disabled'
Type: | String |
Position: | 5 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Resource Group Name.
Type: | String |
Position: | 0 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Retention In Days, 90 by default.
Type: | Nullable<T>[Int32] |
Position: | 3 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Component Tags.
Type: | Hashtable |
Aliases: | Tags |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None