Module loganalytics

@pulumi/azure > loganalytics

class LinkedService

extends CustomResource

Links a Log Analytics (formally Operational Insights) Workspace to another resource. The (currently) only linkable service is an Azure Automation Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = new azure.core.ResourceGroup("test", {
    location: "West Europe",
    name: "resourcegroup-01",
});
const testAccount = new azure.automation.Account("test", {
    location: testResourceGroup.location,
    name: "automation-01",
    resourceGroupName: testResourceGroup.name,
    sku: {
        name: "Basic",
    },
    tags: {
        environment: "development",
    },
});
const testAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("test", {
    location: testResourceGroup.location,
    name: "workspace-01",
    resourceGroupName: testResourceGroup.name,
    retentionInDays: 30,
    sku: "PerGB2018",
});
const testLinkedService = new azure.loganalytics.LinkedService("test", {
    resourceGroupName: testResourceGroup.name,
    resourceId: testAccount.id,
    workspaceName: testAnalyticsWorkspace.name,
});

constructor

new LinkedService(name: string, args: LinkedServiceArgs, opts?: pulumi.CustomResourceOptions)

Create a LinkedService resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LinkedServiceState, opts?: pulumi.CustomResourceOptions): LinkedService

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property linkedServiceName

public linkedServiceName: pulumi.Output<string | undefined>;

Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Currently it defaults to and only supports automation as a value. Changing this forces a new resource to be created.

property linkedServiceProperties

public linkedServiceProperties: pulumi.Output<{
    resourceId: string;
}[]>;

A linked_service_properties block as defined below.

property name

public name: pulumi.Output<string>;

The automatically generated name of the Linked Service. This cannot be specified. The format is always <workspace_name>/<linked_service_name> e.g. workspace1/Automation

property resourceGroupName

public resourceGroupName: pulumi.Output<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.

property resourceId

public resourceId: pulumi.Output<string>;

The resource id of the resource that will be linked to the workspace. This field has been deprecated in favour of the top-level resource_id field and will be removed in v2.0 of the AzureRM Provider.

property tags

public tags: pulumi.Output<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property workspaceName

public workspaceName: pulumi.Output<string>;

Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.

interface LinkedServiceArgs

The set of arguments for constructing a LinkedService resource.

property linkedServiceName

linkedServiceName?: pulumi.Input<string>;

Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Currently it defaults to and only supports automation as a value. Changing this forces a new resource to be created.

property linkedServiceProperties

linkedServiceProperties?: pulumi.Input<pulumi.Input<{
    resourceId: pulumi.Input<string>;
}>[]>;

A linked_service_properties block as defined below.

property resourceGroupName

resourceGroupName: pulumi.Input<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.

property resourceId

resourceId?: pulumi.Input<string>;

The resource id of the resource that will be linked to the workspace. This field has been deprecated in favour of the top-level resource_id field and will be removed in v2.0 of the AzureRM Provider.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property workspaceName

workspaceName: pulumi.Input<string>;

Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.

interface LinkedServiceState

Input properties used for looking up and filtering LinkedService resources.

property linkedServiceName

linkedServiceName?: pulumi.Input<string>;

Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in workspace_name. Currently it defaults to and only supports automation as a value. Changing this forces a new resource to be created.

property linkedServiceProperties

linkedServiceProperties?: pulumi.Input<pulumi.Input<{
    resourceId: pulumi.Input<string>;
}>[]>;

A linked_service_properties block as defined below.

property name

name?: pulumi.Input<string>;

The automatically generated name of the Linked Service. This cannot be specified. The format is always <workspace_name>/<linked_service_name> e.g. workspace1/Automation

property resourceGroupName

resourceGroupName?: pulumi.Input<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.

property resourceId

resourceId?: pulumi.Input<string>;

The resource id of the resource that will be linked to the workspace. This field has been deprecated in favour of the top-level resource_id field and will be removed in v2.0 of the AzureRM Provider.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property workspaceName

workspaceName?: pulumi.Input<string>;

Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.