1. Packages
  2. Azure Classic
  3. API Docs
  4. loganalytics
  5. LinkedService

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Log Analytics Linked Service.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleAccount = new Azure.Automation.Account("exampleAccount", new Azure.Automation.AccountArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                SkuName = "Basic",
                Tags = 
                {
                    { "environment", "development" },
                },
            });
            var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", new Azure.OperationalInsights.AnalyticsWorkspaceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                Sku = "PerGB2018",
                RetentionInDays = 30,
            });
            var exampleLinkedService = new Azure.LogAnalytics.LinkedService("exampleLinkedService", new Azure.LogAnalytics.LinkedServiceArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                WorkspaceId = exampleAnalyticsWorkspace.Id,
                ReadAccessId = exampleAccount.Id,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/automation"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/loganalytics"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/operationalinsights"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := automation.NewAccount(ctx, "exampleAccount", &automation.AccountArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			SkuName:           pulumi.String("Basic"),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("development"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Sku:               pulumi.String("PerGB2018"),
    			RetentionInDays:   pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = loganalytics.NewLinkedService(ctx, "exampleLinkedService", &loganalytics.LinkedServiceArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			WorkspaceId:       exampleAnalyticsWorkspace.ID(),
    			ReadAccessId:      exampleAccount.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleAccount = new azure.automation.Account("exampleAccount", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        skuName: "Basic",
        tags: {
            environment: "development",
        },
    });
    const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        sku: "PerGB2018",
        retentionInDays: 30,
    });
    const exampleLinkedService = new azure.loganalytics.LinkedService("exampleLinkedService", {
        resourceGroupName: exampleResourceGroup.name,
        workspaceId: exampleAnalyticsWorkspace.id,
        readAccessId: exampleAccount.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_account = azure.automation.Account("exampleAccount",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        sku_name="Basic",
        tags={
            "environment": "development",
        })
    example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        sku="PerGB2018",
        retention_in_days=30)
    example_linked_service = azure.loganalytics.LinkedService("exampleLinkedService",
        resource_group_name=example_resource_group.name,
        workspace_id=example_analytics_workspace.id,
        read_access_id=example_account.id)
    

    Example coming soon!

    Create LinkedService Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new LinkedService(name: string, args: LinkedServiceArgs, opts?: CustomResourceOptions);
    @overload
    def LinkedService(resource_name: str,
                      args: LinkedServiceArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def LinkedService(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      resource_group_name: Optional[str] = None,
                      linked_service_name: Optional[str] = None,
                      read_access_id: Optional[str] = None,
                      resource_id: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      workspace_id: Optional[str] = None,
                      workspace_name: Optional[str] = None,
                      write_access_id: Optional[str] = None)
    func NewLinkedService(ctx *Context, name string, args LinkedServiceArgs, opts ...ResourceOption) (*LinkedService, error)
    public LinkedService(string name, LinkedServiceArgs args, CustomResourceOptions? opts = null)
    public LinkedService(String name, LinkedServiceArgs args)
    public LinkedService(String name, LinkedServiceArgs args, CustomResourceOptions options)
    
    type: azure:loganalytics:LinkedService
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args LinkedServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args LinkedServiceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args LinkedServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LinkedServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LinkedServiceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var linkedServiceResource = new Azure.LogAnalytics.LinkedService("linkedServiceResource", new()
    {
        ResourceGroupName = "string",
        ReadAccessId = "string",
        Tags = 
        {
            { "string", "string" },
        },
        WorkspaceId = "string",
        WriteAccessId = "string",
    });
    
    example, err := loganalytics.NewLinkedService(ctx, "linkedServiceResource", &loganalytics.LinkedServiceArgs{
    	ResourceGroupName: pulumi.String("string"),
    	ReadAccessId:      pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	WorkspaceId:   pulumi.String("string"),
    	WriteAccessId: pulumi.String("string"),
    })
    
    var linkedServiceResource = new com.pulumi.azure.loganalytics.LinkedService("linkedServiceResource", com.pulumi.azure.loganalytics.LinkedServiceArgs.builder()
        .resourceGroupName("string")
        .readAccessId("string")
        .tags(Map.of("string", "string"))
        .workspaceId("string")
        .writeAccessId("string")
        .build());
    
    linked_service_resource = azure.loganalytics.LinkedService("linkedServiceResource",
        resource_group_name="string",
        read_access_id="string",
        tags={
            "string": "string",
        },
        workspace_id="string",
        write_access_id="string")
    
    const linkedServiceResource = new azure.loganalytics.LinkedService("linkedServiceResource", {
        resourceGroupName: "string",
        readAccessId: "string",
        tags: {
            string: "string",
        },
        workspaceId: "string",
        writeAccessId: "string",
    });
    
    type: azure:loganalytics:LinkedService
    properties:
        readAccessId: string
        resourceGroupName: string
        tags:
            string: string
        workspaceId: string
        writeAccessId: string
    

    LinkedService Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The LinkedService resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    LinkedServiceName string
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    ReadAccessId string
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    ResourceId string
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    WorkspaceId string
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    WorkspaceName string
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    WriteAccessId string
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    ResourceGroupName string
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    LinkedServiceName string
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    ReadAccessId string
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    ResourceId string
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    Tags map[string]string
    A mapping of tags to assign to the resource.
    WorkspaceId string
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    WorkspaceName string
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    WriteAccessId string
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    resourceGroupName String
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    linkedServiceName String
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    readAccessId String
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    resourceId String
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    tags Map<String,String>
    A mapping of tags to assign to the resource.
    workspaceId String
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    workspaceName String
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    writeAccessId String
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    resourceGroupName string
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    linkedServiceName string
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    readAccessId string
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    resourceId string
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    workspaceId string
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    workspaceName string
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    writeAccessId string
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    resource_group_name str
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    linked_service_name str
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    read_access_id str
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    resource_id str
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    workspace_id str
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    workspace_name str
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    write_access_id str
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    resourceGroupName String
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    linkedServiceName String
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    readAccessId String
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    resourceId String
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    tags Map<String>
    A mapping of tags to assign to the resource.
    workspaceId String
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    workspaceName String
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    writeAccessId String
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LinkedService resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)

    Look up Existing LinkedService Resource

    Get an existing LinkedService resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LinkedServiceState, opts?: CustomResourceOptions): LinkedService
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            linked_service_name: Optional[str] = None,
            name: Optional[str] = None,
            read_access_id: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            resource_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            workspace_id: Optional[str] = None,
            workspace_name: Optional[str] = None,
            write_access_id: Optional[str] = None) -> LinkedService
    func GetLinkedService(ctx *Context, name string, id IDInput, state *LinkedServiceState, opts ...ResourceOption) (*LinkedService, error)
    public static LinkedService Get(string name, Input<string> id, LinkedServiceState? state, CustomResourceOptions? opts = null)
    public static LinkedService get(String name, Output<String> id, LinkedServiceState state, CustomResourceOptions options)
    resources:  _:    type: azure:loganalytics:LinkedService    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    LinkedServiceName string
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    Name string
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    ReadAccessId string
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    ResourceGroupName string
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    ResourceId string
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    WorkspaceId string
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    WorkspaceName string
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    WriteAccessId string
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    LinkedServiceName string
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    Name string
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    ReadAccessId string
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    ResourceGroupName string
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    ResourceId string
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    Tags map[string]string
    A mapping of tags to assign to the resource.
    WorkspaceId string
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    WorkspaceName string
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    WriteAccessId string
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    linkedServiceName String
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    name String
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    readAccessId String
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    resourceGroupName String
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    resourceId String
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    tags Map<String,String>
    A mapping of tags to assign to the resource.
    workspaceId String
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    workspaceName String
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    writeAccessId String
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    linkedServiceName string
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    name string
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    readAccessId string
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    resourceGroupName string
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    resourceId string
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    workspaceId string
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    workspaceName string
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    writeAccessId string
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    linked_service_name str
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    name str
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    read_access_id str
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    resource_group_name str
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    resource_id str
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    workspace_id str
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    workspace_name str
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    write_access_id str
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
    linkedServiceName String
    Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Accepted values are automation and cluster. Defaults to automation. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated and will be removed in a future version of the provider

    name String
    The generated name of the Linked Service. The format for this attribute is always <workspace name>/<linked service type>(e.g. workspace1/Automation or workspace1/Cluster)
    readAccessId String
    The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
    resourceGroupName String
    The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
    resourceId String
    The ID of the Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.

    Deprecated: This field has been deprecated in favour of read_access_id and will be removed in a future version of the provider

    tags Map<String>
    A mapping of tags to assign to the resource.
    workspaceId String
    The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.
    workspaceName String
    The name of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource. Changing this forces a new resource to be created.

    Deprecated: This field has been deprecated in favour of workspace_id and will be removed in a future version of the provider

    writeAccessId String
    The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.

    Import

    Log Analytics Workspaces can be imported using the resource id, e.g.

     $ pulumi import azure:loganalytics/linkedService:LinkedService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/linkedServices/Automation
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.