az monitor log-analytics workspace linked-service
Manage linked service for log analytics workspace.
Linked services is used to defined 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
az monitor log-analytics workspace linked-service create |
Create a linked service. |
az monitor log-analytics workspace linked-service delete |
Delete a linked service. |
az monitor log-analytics workspace linked-service list |
Gets all the linked services in a workspace. |
az monitor log-analytics workspace linked-service show |
Show the properties of a linked service. |
az monitor log-analytics workspace linked-service update |
Update a linked service. |
az monitor log-analytics workspace linked-service wait |
Place the CLI in a waiting state until a condition of the linked service is met. |
az monitor log-analytics workspace linked-service create
Create a linked service.
az monitor log-analytics workspace linked-service create --name
--resource-group
--workspace-name
[--no-wait]
[--resource-id]
[--subscription]
[--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>
.
Name of the Log Analytics 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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access.
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.
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 --name
--resource-group
--workspace-name
[--no-wait]
[--subscription]
[--yes]
Examples
Delete a linked service.
az monitor log-analytics workspace linked-service delete -g MyResourceGroup -n cluster --workspace-name MyWorkspace
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>
.
Name of the Log Analytics Workspace.
Optional Parameters
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
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.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics workspace linked-service list
Gets all the linked services in a workspace.
az monitor log-analytics workspace linked-service list --resource-group
--workspace-name
[--query-examples]
[--subscription]
Examples
Gets 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>
.
Name of the Log Analytics Workspace.
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
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 --name
--resource-group
--workspace-name
[--query-examples]
[--subscription]
Examples
Show the properties of a linked service.
az monitor log-analytics workspace linked-service show -g MyResourceGroup -n cluster --workspace-name MyWorkspace
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>
.
Name of the Log Analytics Workspace.
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
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 --name
--resource-group
--workspace-name
[--add]
[--force-string]
[--no-wait]
[--remove]
[--resource-id]
[--set]
[--subscription]
[--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
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>
.
Name of the Log Analytics Workspace.
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.
Do not wait for the long-running operation to finish.
Remove a property or an element from a list. Example: --remove property.list
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=
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access.
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.
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 of the linked service is met.
az monitor log-analytics workspace linked-service wait --name
--resource-group
--workspace-name
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--subscription]
[--timeout]
[--updated]
Examples
Pause executing next line of CLI script until the linked service is successfully provisioned.
az monitor log-analytics workspace linked-service wait -n cluster -g MyResourceGroup --workspace-name MyWorkspace --created
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>
.
Name of the Log Analytics Workspace.
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.
Polling interval in seconds.
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'.
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.
Increase logging verbosity. Use --debug for full debug logs.