az monitor log-analytics workspace linked-service
Manage linked service for log analytics workspace.
Linked services is used to define a relation from the workspace to another Azure resource. Log Analytics and Azure resources then leverage this connection in their operations. Example uses of Linked Services in Log Analytics workspace are Automation account and workspace association to CMK.
Commands
Name | Description | Type | Status |
---|---|---|---|
az monitor log-analytics workspace linked-service create |
Create a linked service. |
Core | GA |
az monitor log-analytics workspace linked-service delete |
Delete a linked service. |
Core | GA |
az monitor log-analytics workspace linked-service list |
Get all the linked services in a workspace. |
Core | GA |
az monitor log-analytics workspace linked-service show |
Show the properties of a linked service. |
Core | GA |
az monitor log-analytics workspace linked-service update |
Update a linked service. |
Core | GA |
az monitor log-analytics workspace linked-service wait |
Place the CLI in a waiting state until a condition is met. |
Core | GA |
az monitor log-analytics workspace linked-service create
Create a linked service.
az monitor log-analytics workspace linked-service create --linked-service-name
--resource-group
--workspace-name
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-id]
[--tags]
[--write-access-resource-id]
Examples
Create a linked service.
az monitor log-analytics workspace linked-service create -g MyResourceGroup -n cluster --workspace-name MyWorkspace --write-access-resource-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/clusters/MyCluster
Required Parameters
Name of the linkedServices resource. Supported values: cluster, automation.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the workspace.
Optional Parameters
Do not wait for the long-running operation to finish.
The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access.
Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics workspace linked-service delete
Delete a linked service.
az monitor log-analytics workspace linked-service delete [--ids]
[--linked-service-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--workspace-name]
[--yes]
Examples
Delete a linked service.
az monitor log-analytics workspace linked-service delete -g MyResourceGroup -n cluster --workspace-name MyWorkspace
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the linkedServices resource. Supported values: cluster, automation.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The name of the workspace.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics workspace linked-service list
Get all the linked services in a workspace.
az monitor log-analytics workspace linked-service list --resource-group
--workspace-name
Examples
Get all the linked services in a workspace.
az monitor log-analytics workspace linked-service list -g MyResourceGroup --workspace-name MyWorkspace
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics workspace linked-service show
Show the properties of a linked service.
az monitor log-analytics workspace linked-service show [--ids]
[--linked-service-name]
[--resource-group]
[--subscription]
[--workspace-name]
Examples
Show the properties of a linked service.
az monitor log-analytics workspace linked-service show -g MyResourceGroup -n cluster --workspace-name MyWorkspace
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the linkedServices resource. Supported values: cluster, automation.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The name of the workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics workspace linked-service update
Update a linked service.
az monitor log-analytics workspace linked-service update [--add]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--linked-service-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--remove]
[--resource-group]
[--resource-id]
[--set]
[--subscription]
[--tags]
[--workspace-name]
[--write-access-resource-id]
Examples
Update a linked service.
az monitor log-analytics workspace linked-service update -g MyResourceGroup -n cluster --workspace-name MyWorkspace --write-access-resource-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/clusters/MyCluster
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the linkedServices resource. Supported values: cluster, automation.
Do not wait for the long-running operation to finish.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The name of the workspace.
The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics workspace linked-service wait
Place the CLI in a waiting state until a condition is met.
az monitor log-analytics workspace linked-service wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--linked-service-name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
[--workspace-name]
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Polling interval in seconds.
Name of the linkedServices resource. Supported values: cluster, automation.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
The name of the workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.