Saved Search Args
data class SavedSearchArgs(val category: Output<String>? = null, val displayName: Output<String>? = null, val functionAlias: Output<String>? = null, val functionParameters: Output<String>? = null, val query: Output<String>? = null, val resourceGroupName: Output<String>? = null, val savedSearchId: Output<String>? = null, val tags: Output<List<TagArgs>>? = null, val version: Output<Double>? = null, val workspaceName: Output<String>? = null) : ConvertibleToJava<SavedSearchArgs>
Value object for saved search results. API Version: 2020-08-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",
});
});
Content copied to clipboard
package main
import (
operationalinsights "github.com/pulumi/pulumi-azure-native-sdk/operationalinsights"
"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.TagArgs{
{
Name: pulumi.String("Group"),
Value: pulumi.String("Computer"),
},
},
Version: pulumi.Float64(2),
WorkspaceName: pulumi.String("TestWS"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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 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(Map.ofEntries(
Map.entry("name", "Group"),
Map.entry("value", "Computer")
))
.version(2)
.workspaceName("TestWS")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:operationalinsights:SavedSearch myresource1 subscriptions/00000000-0000-0000-0000-000000000005/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/AtlantisDemo/savedSearches/test-new-saved-search-id-2015
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(category: Output<String>? = null, displayName: Output<String>? = null, functionAlias: Output<String>? = null, functionParameters: Output<String>? = null, query: Output<String>? = null, resourceGroupName: Output<String>? = null, savedSearchId: Output<String>? = null, tags: Output<List<TagArgs>>? = null, version: Output<Double>? = null, workspaceName: Output<String>? = null)
Properties
Link copied to clipboard
Saved search display name.
Link copied to clipboard
The function alias if query serves as a function.
Link copied to clipboard
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.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
The id of the saved search.
Link copied to clipboard
The name of the workspace.