你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzLogAnalyticsDestinationObject

Create an in-memory object for LogAnalyticsDestination.

Syntax

New-AzLogAnalyticsDestinationObject
   [-Name <String>]
   [-WorkspaceResourceId <String>]
   [<CommonParameters>]

Description

Create an in-memory object for LogAnalyticsDestination.

Examples

Example 1: Create a log analytics destination object

New-AzLogAnalyticsDestinationObject -Name centralWorkspace -WorkspaceResourceId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/sipstestcx9d03/providers/microsoft.operationalinsights/workspaces/asptest4k37qz

Name             WorkspaceId WorkspaceResourceId
----             ----------- -------------------
centralWorkspace             /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/sipstestcx9d03/providers/microsoft.operationalinsights/workspaces/asptest4k…

This command creates a log analytics destination object.

Parameters

-Name

A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule.

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

-WorkspaceResourceId

The resource ID of the Log Analytics workspace.

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

Outputs

LogAnalyticsDestination