Jaa


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

--linked-service-name --name -n

Name of the linkedServices resource. Supported values: cluster, automation.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name

The name of the workspace.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-id

The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access.

--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--write-access-resource-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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--ids

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.

--linked-service-name --name -n

Name of the linkedServices resource. Supported values: cluster, automation.

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--workspace-name

The name of the workspace.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name

The name of the workspace.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--ids

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.

--linked-service-name --name -n

Name of the linkedServices resource. Supported values: cluster, automation.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--workspace-name

The name of the workspace.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

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>.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

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.

--linked-service-name --name -n

Name of the linkedServices resource. Supported values: cluster, automation.

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-id

The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--workspace-name

The name of the workspace.

--write-access-resource-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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--ids

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.

--interval

Polling interval in seconds.

Default value: 30
--linked-service-name --name -n

Name of the linkedServices resource. Supported values: cluster, automation.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
--workspace-name

The name of the workspace.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.