SavedSearchArgs

data class SavedSearchArgs(val category: Output<String>? = null, val displayName: Output<String>? = null, val functionAlias: Output<String>? = null, val functionParameters: Output<List<String>>? = null, val logAnalyticsWorkspaceId: Output<String>? = null, val name: Output<String>? = null, val query: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<SavedSearchArgs>

Manages a Log Analytics (formally Operational Insights) Saved Search.

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.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.loganalytics.SavedSearch;
import com.pulumi.azure.loganalytics.SavedSearchArgs;
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 exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("PerGB2018")
.retentionInDays(30)
.build());
var exampleSavedSearch = new SavedSearch("exampleSavedSearch", SavedSearchArgs.builder()
.logAnalyticsWorkspaceId(exampleAnalyticsWorkspace.id())
.category("exampleCategory")
.displayName("exampleDisplayName")
.query("exampleQuery")
.build());
}
}

Import

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

$ pulumi import azure:loganalytics/savedSearch:SavedSearch search1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/savedSearches/search1

Constructors

Link copied to clipboard
fun SavedSearchArgs(category: Output<String>? = null, displayName: Output<String>? = null, functionAlias: Output<String>? = null, functionParameters: Output<List<String>>? = null, logAnalyticsWorkspaceId: Output<String>? = null, name: Output<String>? = null, query: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Functions

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

Properties

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

The category that the Saved Search will be listed under. Changing this forces a new resource to be created.

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

The name that Saved Search will be displayed as. Changing this forces a new resource to be created.

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

The function alias if the query serves as a function. Changing this forces a new resource to be created.

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

The function parameters if the query serves as a function. Changing this forces a new resource to be created.

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

Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.

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

Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.

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

The query expression for the saved search. Changing this forces a new resource to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created.