Skip to main content

linked_services

Creates, updates, deletes, gets or lists a linked_services resource.

Overview

Namelinked_services
TypeResource
Idazure.log_analytics.linked_services

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
provisioningStatestringThe provisioning state of the linked service. Known values are: "Succeeded", "Deleting", "ProvisioningAccount", and "Updating". (Succeeded, Deleting, ProvisioningAccount, Updating)
resourceIdstringThe resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
writeAccessResourceIdstringThe resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, workspace_name, linked_service_name, subscription_idGets a linked service instance.
list_by_workspaceselectresource_group_name, workspace_name, subscription_idGets the linked services instances in a workspace.
create_or_updateinsertresource_group_name, workspace_name, linked_service_name, subscription_id, propertiesCreate or update a linked service.
create_or_updatereplaceresource_group_name, workspace_name, linked_service_name, subscription_id, propertiesCreate or update a linked service.
deletedeleteresource_group_name, workspace_name, linked_service_name, subscription_idDeletes a linked service instance.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
linked_service_namestringName of the linked service. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
workspace_namestringThe name of the workspace. Required.

SELECT examples

Gets a linked service instance.

SELECT
id,
name,
provisioningState,
resourceId,
systemData,
tags,
type,
writeAccessResourceId
FROM azure.log_analytics.linked_services
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND linked_service_name = '{{ linked_service_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a linked service.

INSERT INTO azure.log_analytics.linked_services (
properties,
tags,
resource_group_name,
workspace_name,
linked_service_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ tags }}',
'{{ resource_group_name }}',
'{{ workspace_name }}',
'{{ linked_service_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
tags,
type
;

REPLACE examples

Create or update a linked service.

REPLACE azure.log_analytics.linked_services
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND linked_service_name = '{{ linked_service_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a linked service instance.

DELETE FROM azure.log_analytics.linked_services
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND linked_service_name = '{{ linked_service_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;