LinkedService

class LinkedService : KotlinCustomResource

Manages a Log Analytics Linked Service.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.automation.Account;
import com.pulumi.azure.automation.AccountArgs;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.loganalytics.LinkedService;
import com.pulumi.azure.loganalytics.LinkedServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.skuName("Basic")
.tags(Map.of("environment", "development"))
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("PerGB2018")
.retentionInDays(30)
.build());
var exampleLinkedService = new LinkedService("exampleLinkedService", LinkedServiceArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.workspaceId(exampleAnalyticsWorkspace.id())
.readAccessId(exampleAccount.id())
.build());
}
}

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

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<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)

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val readAccessId: Output<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.

Link copied to clipboard

The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val workspaceId: Output<String>

The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.

Link copied to clipboard
val writeAccessId: Output<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.