New-AzLogAnalyticsDestinationObject
Create an in-memory object for LogAnalyticsDestination.
Syntax
Default (Default)
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.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-WorkspaceResourceId
The resource ID of the Log Analytics workspace.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.