New-AzApplicationInsightsContinuousExport

Create a new application insights continuous export configuration for an application insights resource

Syntax

New-AzApplicationInsightsContinuousExport
   [-ResourceGroupName] <String>
   [-Name] <String>
   -DocumentType <String[]>
   -StorageAccountId <String>
   -StorageLocation <String>
   -StorageSASUri <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzApplicationInsightsContinuousExport
   [-ApplicationInsightsComponent] <PSApplicationInsightsComponent>
   -DocumentType <String[]>
   -StorageAccountId <String>
   -StorageLocation <String>
   -StorageSASUri <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzApplicationInsightsContinuousExport
   [-ResourceId] <String>
   -DocumentType <String[]>
   -StorageAccountId <String>
   -StorageLocation <String>
   -StorageSASUri <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Create a new application insights continuous export configuration for an application insights resource

Examples

Example 1 Create a new continuous export configuration for an application insights resource

PS C:\> $sastoken = New-AzStorageContainerSASToken -Name testcontainer -Context $context -ExpiryTime (Get-Date).AddYears(50) -Permission w
PS C:\> $sasuri = "https://teststorageaccount.blob.core.windows.net/testcontainer" + $sastoken
PS C:\> New-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test"
 -DocumentType "Request","Trace", "Custom Event" -StorageAccountId "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba96/resourceGroups/testgroup/providers/Microsoft.Storage/storageAccounts/teststorageaccount" -StorageLocation sourcecentralus
 -StorageSASUri $sasuri

ExportId                         : jlTFEiBg1rkDXOCIeJQ2mB2TxZg=
StorageName                      : teststorageaccount
ContainerName                    : testcontainer
DocumentTypes                    : Request, Custom Event, Trace
DestinationStorageSubscriptionId : 50359d91-7b9d-4823-85af-eb298a61ba96
DestinationStorageLocationId     : sourcecentralus
DestinationStorageAccountId      : /subscriptions/50359d91-7b9d-4823-85af-eb298a61ba96/resourceGroups/testgroup/providers/Microsoft.Storage/storageAccounts/teststorageaccount
IsEnabled                        : True
ExportStatus                     : Preparing
LastSuccessTime                  :

Create a new application insights continuous export configuration to export "Request" and "Trace" document types to storage contain "testcontainer" in storage account "teststorageaccount" in resource group "testgroup". The SAS token have to be valid and have write permission to the container, otherwise continuous export feature won't work.If SAS token expired, the continuous export feature will stop working.

Parameters

-ApplicationInsightsComponent

Application Insights Component Object.

Type:PSApplicationInsightsComponent
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Confirm

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
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DocumentType

Document types that need exported.

Type:String[]
Accepted values:Request, Exception, Custom Event, Trace, Metric, Page Load, Page View, Dependency, Availability, Performance Counter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Component Name.

Type:String
Aliases:ApplicationInsightsComponentName, ComponentName
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Resource Group Name.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceId

Application Insights Component Resource Id.

Type:String
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-StorageAccountId

Destination Storage Account Id.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageLocation

Destination Storage Location Id.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageSASUri

Destination Storage SAS Uri.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

PSApplicationInsightsComponent

String

Outputs

PSExportConfiguration