LinkedServiceArgs

data class LinkedServiceArgs(val readAccessId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val workspaceId: Output<String>? = null, val writeAccessId: Output<String>? = null) : ConvertibleToJava<LinkedServiceArgs>

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

Constructors

Link copied to clipboard
fun LinkedServiceArgs(readAccessId: Output<String>? = null, resourceGroupName: Output<String>? = null, workspaceId: Output<String>? = null, writeAccessId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): LinkedServiceArgs

Properties

Link copied to clipboard
val readAccessId: Output<String>? = null

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
val resourceGroupName: Output<String>? = null

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 workspaceId: Output<String>? = null

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

Link copied to clipboard
val writeAccessId: Output<String>? = null

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.