azure-native.operationalinsights.SavedSearch
Explore with Pulumi AI
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",
});
});
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
})
}
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());
}
}
import pulumi
import pulumi_azure_native as azure_native
saved_search = azure_native.operationalinsights.SavedSearch("savedSearch",
category="Saved Search Test Category",
display_name="Create or Update Saved Search Test",
function_alias="heartbeat_func",
function_parameters="a:int=1",
query="Heartbeat | summarize Count() by Computer | take a",
resource_group_name="TestRG",
saved_search_id="00000000-0000-0000-0000-00000000000",
tags=[azure_native.operationalinsights.TagArgs(
name="Group",
value="Computer",
)],
version=2,
workspace_name="TestWS")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const savedSearch = new azure_native.operationalinsights.SavedSearch("savedSearch", {
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: [{
name: "Group",
value: "Computer",
}],
version: 2,
workspaceName: "TestWS",
});
resources:
savedSearch:
type: azure-native:operationalinsights:SavedSearch
properties:
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:
- name: Group
value: Computer
version: 2
workspaceName: TestWS
Create SavedSearch Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SavedSearch(name: string, args: SavedSearchArgs, opts?: CustomResourceOptions);
@overload
def SavedSearch(resource_name: str,
args: SavedSearchArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SavedSearch(resource_name: str,
opts: Optional[ResourceOptions] = None,
category: Optional[str] = None,
display_name: Optional[str] = None,
query: Optional[str] = None,
resource_group_name: Optional[str] = None,
workspace_name: Optional[str] = None,
function_alias: Optional[str] = None,
function_parameters: Optional[str] = None,
saved_search_id: Optional[str] = None,
tags: Optional[Sequence[TagArgs]] = None,
version: Optional[float] = None)
func NewSavedSearch(ctx *Context, name string, args SavedSearchArgs, opts ...ResourceOption) (*SavedSearch, error)
public SavedSearch(string name, SavedSearchArgs args, CustomResourceOptions? opts = null)
public SavedSearch(String name, SavedSearchArgs args)
public SavedSearch(String name, SavedSearchArgs args, CustomResourceOptions options)
type: azure-native:operationalinsights:SavedSearch
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SavedSearchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SavedSearchArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SavedSearchArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SavedSearchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SavedSearchArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var savedSearchResource = new AzureNative.Operationalinsights.SavedSearch("savedSearchResource", new()
{
Category = "string",
DisplayName = "string",
Query = "string",
ResourceGroupName = "string",
WorkspaceName = "string",
FunctionAlias = "string",
FunctionParameters = "string",
SavedSearchId = "string",
Tags = new[]
{
{
{ "name", "string" },
{ "value", "string" },
},
},
Version = 0,
});
example, err := operationalinsights.NewSavedSearch(ctx, "savedSearchResource", &operationalinsights.SavedSearchArgs{
Category: "string",
DisplayName: "string",
Query: "string",
ResourceGroupName: "string",
WorkspaceName: "string",
FunctionAlias: "string",
FunctionParameters: "string",
SavedSearchId: "string",
Tags: []map[string]interface{}{
map[string]interface{}{
"name": "string",
"value": "string",
},
},
Version: 0,
})
var savedSearchResource = new SavedSearch("savedSearchResource", SavedSearchArgs.builder()
.category("string")
.displayName("string")
.query("string")
.resourceGroupName("string")
.workspaceName("string")
.functionAlias("string")
.functionParameters("string")
.savedSearchId("string")
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.version(0)
.build());
saved_search_resource = azure_native.operationalinsights.SavedSearch("savedSearchResource",
category=string,
display_name=string,
query=string,
resource_group_name=string,
workspace_name=string,
function_alias=string,
function_parameters=string,
saved_search_id=string,
tags=[{
name: string,
value: string,
}],
version=0)
const savedSearchResource = new azure_native.operationalinsights.SavedSearch("savedSearchResource", {
category: "string",
displayName: "string",
query: "string",
resourceGroupName: "string",
workspaceName: "string",
functionAlias: "string",
functionParameters: "string",
savedSearchId: "string",
tags: [{
name: "string",
value: "string",
}],
version: 0,
});
type: azure-native:operationalinsights:SavedSearch
properties:
category: string
displayName: string
functionAlias: string
functionParameters: string
query: string
resourceGroupName: string
savedSearchId: string
tags:
- name: string
value: string
version: 0
workspaceName: string
SavedSearch Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SavedSearch resource accepts the following input properties:
- Category string
- The category of the saved search. This helps the user to find a saved search faster.
- Display
Name string - Saved search display name.
- Query string
- The query expression for the saved search.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Workspace
Name string - The name of the workspace.
- Function
Alias string - The function alias if query serves as a function.
- Function
Parameters string - 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.
- Saved
Search stringId - The id of the saved search.
- List<Pulumi.
Azure Native. Operational Insights. Inputs. Tag> - The tags attached to the saved search.
- Version double
- The version number of the query language. The current version is 2 and is the default.
- Category string
- The category of the saved search. This helps the user to find a saved search faster.
- Display
Name string - Saved search display name.
- Query string
- The query expression for the saved search.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Workspace
Name string - The name of the workspace.
- Function
Alias string - The function alias if query serves as a function.
- Function
Parameters string - 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.
- Saved
Search stringId - The id of the saved search.
- []Tag
Args - The tags attached to the saved search.
- Version float64
- The version number of the query language. The current version is 2 and is the default.
- category String
- The category of the saved search. This helps the user to find a saved search faster.
- display
Name String - Saved search display name.
- query String
- The query expression for the saved search.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- workspace
Name String - The name of the workspace.
- function
Alias String - The function alias if query serves as a function.
- function
Parameters String - 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.
- saved
Search StringId - The id of the saved search.
- List<Tag>
- The tags attached to the saved search.
- version Double
- The version number of the query language. The current version is 2 and is the default.
- category string
- The category of the saved search. This helps the user to find a saved search faster.
- display
Name string - Saved search display name.
- query string
- The query expression for the saved search.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- workspace
Name string - The name of the workspace.
- function
Alias string - The function alias if query serves as a function.
- function
Parameters string - 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.
- saved
Search stringId - The id of the saved search.
- Tag[]
- The tags attached to the saved search.
- version number
- The version number of the query language. The current version is 2 and is the default.
- category str
- The category of the saved search. This helps the user to find a saved search faster.
- display_
name str - Saved search display name.
- query str
- The query expression for the saved search.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- workspace_
name str - The name of the workspace.
- function_
alias str - The function alias if query serves as a function.
- function_
parameters str - 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.
- saved_
search_ strid - The id of the saved search.
- Sequence[Tag
Args] - The tags attached to the saved search.
- version float
- The version number of the query language. The current version is 2 and is the default.
- category String
- The category of the saved search. This helps the user to find a saved search faster.
- display
Name String - Saved search display name.
- query String
- The query expression for the saved search.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- workspace
Name String - The name of the workspace.
- function
Alias String - The function alias if query serves as a function.
- function
Parameters String - 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.
- saved
Search StringId - The id of the saved search.
- List<Property Map>
- The tags attached to the saved search.
- version Number
- The version number of the query language. The current version is 2 and is the default.
Outputs
All input properties are implicitly available as output properties. Additionally, the SavedSearch resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Etag string
- The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Etag string
- The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- etag String
- The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- etag string
- The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- etag str
- The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- etag String
- The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag
Supporting Types
Tag, TagArgs
TagResponse, TagResponseArgs
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0