Skip to content

Commit c480301

Browse files
committed
Update New-AzOperationalInsightsApplicationInsightsDataSource.md
1 parent 0fe0e4f commit c480301

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/OperationalInsights/OperationalInsights/help/New-AzOperationalInsightsApplicationInsightsDataSource.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ Properties : {"linkedResourceId":"subscriptions/e791a474-ee54-46a2-bb06-5
6565
6666
```
6767

68-
### Example 2: Create application-insights data source in workspace by the application resource id
68+
This command creates an application-insights data source of a given application in a given log analytics workpsace. This enables the collection of logs from given application to the log analytics workpsace.
69+
70+
### Example 2: Get workspace object and create application-insights data source by the application resource id
6971
```
70-
PS C:\> New-AzOperationalInsightsApplicationInsightsDataSource -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "MyWorkspace" -ApplicationResourceId "/subscriptions/e791a474-ee54-46a2-bb06-5e058302d234/resourceGroups/ContosoResourceGroup/providers/microsoft.insights/components/MyAIApplication"
72+
PS C:\> Get-AzureRmOperationalInsightsWorkspace -Name "MyWorkspace" -ResourceGroupName "ContosoResourceGroup" | New-AzOperationalInsightsApplicationInsightsDataSource -ApplicationResourceId "/subscriptions/e791a474-ee54-46a2-bb06-5e058302d234/resourceGroups/ContosoResourceGroup/providers/microsoft.insights/components/MyAIApplication"
7173
7274
Name : subscriptions/aaaaa474-ee54-4aaa-bb06-5e058302daaa/resourceGroups/ContosoResourceGroup/providers/microsoft.insights/components/MyAIApplication
7375
ResourceGroupName : ContosoResourceGroup
@@ -78,7 +80,7 @@ Properties : {"linkedResourceId":"subscriptions/e791a474-ee54-46a2-bb06-5
7880
7981
```
8082

81-
These commands create an application-insights data source of a given application in a given log analytics workpsace. This enables the collection of logs from given application to the log analytics workpsace.
83+
This command demonstrates getting a log analytics workspace object and then passing the output to create an associated application-insights data source by the application resource id.
8284

8385
## PARAMETERS
8486

0 commit comments

Comments
 (0)