Muokkaa

Jaa


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