Saved Search Args
Value object for saved search results. Uses Azure REST API version 2020-08-01. In version 1.x of the Azure Native provider, it used API version 2020-08-01. Other available API versions: 2023-09-01, 2025-02-01.
Example Usage
SavedSearchCreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var savedSearch = new AzureNative.OperationalInsights.SavedSearch("savedSearch", new()
{
Category = "Saved Search Test Category",
DisplayName = "Create or Update Saved Search Test",
FunctionAlias = "heartbeat_func",
FunctionParameters = "a:int=1",
Query = "Heartbeat | summarize Count() by Computer | take a",
ResourceGroupName = "TestRG",
SavedSearchId = "00000000-0000-0000-0000-00000000000",
Tags = new[]
{
new AzureNative.OperationalInsights.Inputs.TagArgs
{
Name = "Group",
Value = "Computer",
},
},
Version = 2,
WorkspaceName = "TestWS",
});
});
package main
import (
operationalinsights "github.com/pulumi/pulumi-azure-native-sdk/operationalinsights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := operationalinsights.NewSavedSearch(ctx, "savedSearch", &operationalinsights.SavedSearchArgs{
Category: pulumi.String("Saved Search Test Category"),
DisplayName: pulumi.String("Create or Update Saved Search Test"),
FunctionAlias: pulumi.String("heartbeat_func"),
FunctionParameters: pulumi.String("a:int=1"),
Query: pulumi.String("Heartbeat | summarize Count() by Computer | take a"),
ResourceGroupName: pulumi.String("TestRG"),
SavedSearchId: pulumi.String("00000000-0000-0000-0000-00000000000"),
Tags: operationalinsights.TagArray{
&operationalinsights.TagArgs{
Name: pulumi.String("Group"),
Value: pulumi.String("Computer"),
},
},
Version: pulumi.Float64(2),
WorkspaceName: pulumi.String("TestWS"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.operationalinsights.SavedSearch;
import com.pulumi.azurenative.operationalinsights.SavedSearchArgs;
import com.pulumi.azurenative.operationalinsights.inputs.TagArgs;
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 savedSearch = new SavedSearch("savedSearch", SavedSearchArgs.builder()
.category("Saved Search Test Category")
.displayName("Create or Update Saved Search Test")
.functionAlias("heartbeat_func")
.functionParameters("a:int=1")
.query("Heartbeat | summarize Count() by Computer | take a")
.resourceGroupName("TestRG")
.savedSearchId("00000000-0000-0000-0000-00000000000")
.tags(TagArgs.builder()
.name("Group")
.value("Computer")
.build())
.version(2)
.workspaceName("TestWS")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:operationalinsights:SavedSearch myresource1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}
Constructors
Properties
Saved search display name.
The function alias if query serves as a function.
The optional function parameters if query serves as a function. Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more examples and proper syntax please refer to https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions.
The name of the resource group. The name is case insensitive.
The id of the saved search.
The name of the workspace.