SavedSearch

class SavedSearch : KotlinCustomResource

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

Properties

Link copied to clipboard
val category: Output<String>

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>

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>?

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

Link copied to clipboard

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

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>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val query: Output<String>

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>>?

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

Link copied to clipboard
val urn: Output<String>