1. Packages
  2. Sumologic Provider
  3. API Docs
  4. MetricsSearchV2
Sumo Logic v1.0.6 published on Tuesday, Mar 11, 2025 by Pulumi

sumologic.MetricsSearchV2

Explore with Pulumi AI

Provides a Sumologic Metrics Search V2.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";

const personalFolder = sumologic.getPersonalFolder({});
const exampleMetricsSearch = new sumologic.MetricsSearchV2("example_metrics_search", {
    title: "Demo Metrics Search",
    description: "Demo search description",
    folderId: personalFolder.then(personalFolder => personalFolder.id),
    queries: [{
        queryKey: "A",
        queryString: "metric=cpu_idle | avg",
        queryType: "Metrics",
        metricsQueryMode: "Advanced",
    }],
    timeRange: {
        beginBoundedTimeRange: {
            from: {
                relativeTimeRange: {
                    relativeTime: "-30m",
                },
            },
        },
    },
});
Copy
import pulumi
import pulumi_sumologic as sumologic

personal_folder = sumologic.get_personal_folder()
example_metrics_search = sumologic.MetricsSearchV2("example_metrics_search",
    title="Demo Metrics Search",
    description="Demo search description",
    folder_id=personal_folder.id,
    queries=[{
        "query_key": "A",
        "query_string": "metric=cpu_idle | avg",
        "query_type": "Metrics",
        "metrics_query_mode": "Advanced",
    }],
    time_range={
        "begin_bounded_time_range": {
            "from_": {
                "relative_time_range": {
                    "relative_time": "-30m",
                },
            },
        },
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		personalFolder, err := sumologic.GetPersonalFolder(ctx, &sumologic.GetPersonalFolderArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = sumologic.NewMetricsSearchV2(ctx, "example_metrics_search", &sumologic.MetricsSearchV2Args{
			Title:       pulumi.String("Demo Metrics Search"),
			Description: pulumi.String("Demo search description"),
			FolderId:    pulumi.String(personalFolder.Id),
			Queries: sumologic.MetricsSearchV2QueryArray{
				&sumologic.MetricsSearchV2QueryArgs{
					QueryKey:         pulumi.String("A"),
					QueryString:      pulumi.String("metric=cpu_idle | avg"),
					QueryType:        pulumi.String("Metrics"),
					MetricsQueryMode: pulumi.String("Advanced"),
				},
			},
			TimeRange: &sumologic.MetricsSearchV2TimeRangeArgs{
				BeginBoundedTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeArgs{
					From: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromArgs{
						RelativeTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs{
							RelativeTime: pulumi.String("-30m"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;

return await Deployment.RunAsync(() => 
{
    var personalFolder = SumoLogic.GetPersonalFolder.Invoke();

    var exampleMetricsSearch = new SumoLogic.MetricsSearchV2("example_metrics_search", new()
    {
        Title = "Demo Metrics Search",
        Description = "Demo search description",
        FolderId = personalFolder.Apply(getPersonalFolderResult => getPersonalFolderResult.Id),
        Queries = new[]
        {
            new SumoLogic.Inputs.MetricsSearchV2QueryArgs
            {
                QueryKey = "A",
                QueryString = "metric=cpu_idle | avg",
                QueryType = "Metrics",
                MetricsQueryMode = "Advanced",
            },
        },
        TimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeArgs
        {
            BeginBoundedTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeArgs
            {
                From = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromArgs
                {
                    RelativeTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs
                    {
                        RelativeTime = "-30m",
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.SumologicFunctions;
import com.pulumi.sumologic.inputs.GetPersonalFolderArgs;
import com.pulumi.sumologic.MetricsSearchV2;
import com.pulumi.sumologic.MetricsSearchV2Args;
import com.pulumi.sumologic.inputs.MetricsSearchV2QueryArgs;
import com.pulumi.sumologic.inputs.MetricsSearchV2TimeRangeArgs;
import com.pulumi.sumologic.inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeArgs;
import com.pulumi.sumologic.inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromArgs;
import com.pulumi.sumologic.inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs;
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) {
        final var personalFolder = SumologicFunctions.getPersonalFolder();

        var exampleMetricsSearch = new MetricsSearchV2("exampleMetricsSearch", MetricsSearchV2Args.builder()
            .title("Demo Metrics Search")
            .description("Demo search description")
            .folderId(personalFolder.applyValue(getPersonalFolderResult -> getPersonalFolderResult.id()))
            .queries(MetricsSearchV2QueryArgs.builder()
                .queryKey("A")
                .queryString("metric=cpu_idle | avg")
                .queryType("Metrics")
                .metricsQueryMode("Advanced")
                .build())
            .timeRange(MetricsSearchV2TimeRangeArgs.builder()
                .beginBoundedTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeArgs.builder()
                    .from(MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromArgs.builder()
                        .relativeTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs.builder()
                            .relativeTime("-30m")
                            .build())
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  exampleMetricsSearch:
    type: sumologic:MetricsSearchV2
    name: example_metrics_search
    properties:
      title: Demo Metrics Search
      description: Demo search description
      folderId: ${personalFolder.id}
      queries:
        - queryKey: A
          queryString: metric=cpu_idle | avg
          queryType: Metrics
          metricsQueryMode: Advanced
      timeRange:
        beginBoundedTimeRange:
          from:
            relativeTimeRange:
              relativeTime: -30m
variables:
  personalFolder:
    fn::invoke:
      function: sumologic:getPersonalFolder
      arguments: {}
Copy

Attributes reference

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the metrics search.

Create MetricsSearchV2 Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MetricsSearchV2(name: string, args: MetricsSearchV2Args, opts?: CustomResourceOptions);
@overload
def MetricsSearchV2(resource_name: str,
                    args: MetricsSearchV2Args,
                    opts: Optional[ResourceOptions] = None)

@overload
def MetricsSearchV2(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    queries: Optional[Sequence[MetricsSearchV2QueryArgs]] = None,
                    time_range: Optional[MetricsSearchV2TimeRangeArgs] = None,
                    title: Optional[str] = None,
                    description: Optional[str] = None,
                    folder_id: Optional[str] = None,
                    visual_settings: Optional[str] = None)
func NewMetricsSearchV2(ctx *Context, name string, args MetricsSearchV2Args, opts ...ResourceOption) (*MetricsSearchV2, error)
public MetricsSearchV2(string name, MetricsSearchV2Args args, CustomResourceOptions? opts = null)
public MetricsSearchV2(String name, MetricsSearchV2Args args)
public MetricsSearchV2(String name, MetricsSearchV2Args args, CustomResourceOptions options)
type: sumologic:MetricsSearchV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MetricsSearchV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MetricsSearchV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MetricsSearchV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MetricsSearchV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MetricsSearchV2Args
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 metricsSearchV2Resource = new SumoLogic.MetricsSearchV2("metricsSearchV2Resource", new()
{
    Queries = new[]
    {
        new SumoLogic.Inputs.MetricsSearchV2QueryArgs
        {
            QueryKey = "string",
            QueryString = "string",
            QueryType = "string",
            MetricsQueryMode = "string",
        },
    },
    TimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeArgs
    {
        BeginBoundedTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeArgs
        {
            From = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromArgs
            {
                EpochTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromEpochTimeRangeArgs
                {
                    EpochMillis = 0,
                },
                Iso8601TimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromIso8601TimeRangeArgs
                {
                    Iso8601Time = "string",
                },
                LiteralTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs
                {
                    RangeName = "string",
                },
                RelativeTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs
                {
                    RelativeTime = "string",
                },
            },
            To = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToArgs
            {
                EpochTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToEpochTimeRangeArgs
                {
                    EpochMillis = 0,
                },
                Iso8601TimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToIso8601TimeRangeArgs
                {
                    Iso8601Time = "string",
                },
                LiteralTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToLiteralTimeRangeArgs
                {
                    RangeName = "string",
                },
                RelativeTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToRelativeTimeRangeArgs
                {
                    RelativeTime = "string",
                },
            },
        },
        CompleteLiteralTimeRange = new SumoLogic.Inputs.MetricsSearchV2TimeRangeCompleteLiteralTimeRangeArgs
        {
            RangeName = "string",
        },
    },
    Title = "string",
    Description = "string",
    FolderId = "string",
    VisualSettings = "string",
});
Copy
example, err := sumologic.NewMetricsSearchV2(ctx, "metricsSearchV2Resource", &sumologic.MetricsSearchV2Args{
	Queries: sumologic.MetricsSearchV2QueryArray{
		&sumologic.MetricsSearchV2QueryArgs{
			QueryKey:         pulumi.String("string"),
			QueryString:      pulumi.String("string"),
			QueryType:        pulumi.String("string"),
			MetricsQueryMode: pulumi.String("string"),
		},
	},
	TimeRange: &sumologic.MetricsSearchV2TimeRangeArgs{
		BeginBoundedTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeArgs{
			From: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromArgs{
				EpochTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromEpochTimeRangeArgs{
					EpochMillis: pulumi.Int(0),
				},
				Iso8601TimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromIso8601TimeRangeArgs{
					Iso8601Time: pulumi.String("string"),
				},
				LiteralTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs{
					RangeName: pulumi.String("string"),
				},
				RelativeTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs{
					RelativeTime: pulumi.String("string"),
				},
			},
			To: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToArgs{
				EpochTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToEpochTimeRangeArgs{
					EpochMillis: pulumi.Int(0),
				},
				Iso8601TimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToIso8601TimeRangeArgs{
					Iso8601Time: pulumi.String("string"),
				},
				LiteralTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToLiteralTimeRangeArgs{
					RangeName: pulumi.String("string"),
				},
				RelativeTimeRange: &sumologic.MetricsSearchV2TimeRangeBeginBoundedTimeRangeToRelativeTimeRangeArgs{
					RelativeTime: pulumi.String("string"),
				},
			},
		},
		CompleteLiteralTimeRange: &sumologic.MetricsSearchV2TimeRangeCompleteLiteralTimeRangeArgs{
			RangeName: pulumi.String("string"),
		},
	},
	Title:          pulumi.String("string"),
	Description:    pulumi.String("string"),
	FolderId:       pulumi.String("string"),
	VisualSettings: pulumi.String("string"),
})
Copy
var metricsSearchV2Resource = new MetricsSearchV2("metricsSearchV2Resource", MetricsSearchV2Args.builder()
    .queries(MetricsSearchV2QueryArgs.builder()
        .queryKey("string")
        .queryString("string")
        .queryType("string")
        .metricsQueryMode("string")
        .build())
    .timeRange(MetricsSearchV2TimeRangeArgs.builder()
        .beginBoundedTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeArgs.builder()
            .from(MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromArgs.builder()
                .epochTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromEpochTimeRangeArgs.builder()
                    .epochMillis(0)
                    .build())
                .iso8601TimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromIso8601TimeRangeArgs.builder()
                    .iso8601Time("string")
                    .build())
                .literalTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs.builder()
                    .rangeName("string")
                    .build())
                .relativeTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs.builder()
                    .relativeTime("string")
                    .build())
                .build())
            .to(MetricsSearchV2TimeRangeBeginBoundedTimeRangeToArgs.builder()
                .epochTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeToEpochTimeRangeArgs.builder()
                    .epochMillis(0)
                    .build())
                .iso8601TimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeToIso8601TimeRangeArgs.builder()
                    .iso8601Time("string")
                    .build())
                .literalTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeToLiteralTimeRangeArgs.builder()
                    .rangeName("string")
                    .build())
                .relativeTimeRange(MetricsSearchV2TimeRangeBeginBoundedTimeRangeToRelativeTimeRangeArgs.builder()
                    .relativeTime("string")
                    .build())
                .build())
            .build())
        .completeLiteralTimeRange(MetricsSearchV2TimeRangeCompleteLiteralTimeRangeArgs.builder()
            .rangeName("string")
            .build())
        .build())
    .title("string")
    .description("string")
    .folderId("string")
    .visualSettings("string")
    .build());
Copy
metrics_search_v2_resource = sumologic.MetricsSearchV2("metricsSearchV2Resource",
    queries=[{
        "query_key": "string",
        "query_string": "string",
        "query_type": "string",
        "metrics_query_mode": "string",
    }],
    time_range={
        "begin_bounded_time_range": {
            "from_": {
                "epoch_time_range": {
                    "epoch_millis": 0,
                },
                "iso8601_time_range": {
                    "iso8601_time": "string",
                },
                "literal_time_range": {
                    "range_name": "string",
                },
                "relative_time_range": {
                    "relative_time": "string",
                },
            },
            "to": {
                "epoch_time_range": {
                    "epoch_millis": 0,
                },
                "iso8601_time_range": {
                    "iso8601_time": "string",
                },
                "literal_time_range": {
                    "range_name": "string",
                },
                "relative_time_range": {
                    "relative_time": "string",
                },
            },
        },
        "complete_literal_time_range": {
            "range_name": "string",
        },
    },
    title="string",
    description="string",
    folder_id="string",
    visual_settings="string")
Copy
const metricsSearchV2Resource = new sumologic.MetricsSearchV2("metricsSearchV2Resource", {
    queries: [{
        queryKey: "string",
        queryString: "string",
        queryType: "string",
        metricsQueryMode: "string",
    }],
    timeRange: {
        beginBoundedTimeRange: {
            from: {
                epochTimeRange: {
                    epochMillis: 0,
                },
                iso8601TimeRange: {
                    iso8601Time: "string",
                },
                literalTimeRange: {
                    rangeName: "string",
                },
                relativeTimeRange: {
                    relativeTime: "string",
                },
            },
            to: {
                epochTimeRange: {
                    epochMillis: 0,
                },
                iso8601TimeRange: {
                    iso8601Time: "string",
                },
                literalTimeRange: {
                    rangeName: "string",
                },
                relativeTimeRange: {
                    relativeTime: "string",
                },
            },
        },
        completeLiteralTimeRange: {
            rangeName: "string",
        },
    },
    title: "string",
    description: "string",
    folderId: "string",
    visualSettings: "string",
});
Copy
type: sumologic:MetricsSearchV2
properties:
    description: string
    folderId: string
    queries:
        - metricsQueryMode: string
          queryKey: string
          queryString: string
          queryType: string
    timeRange:
        beginBoundedTimeRange:
            from:
                epochTimeRange:
                    epochMillis: 0
                iso8601TimeRange:
                    iso8601Time: string
                literalTimeRange:
                    rangeName: string
                relativeTimeRange:
                    relativeTime: string
            to:
                epochTimeRange:
                    epochMillis: 0
                iso8601TimeRange:
                    iso8601Time: string
                literalTimeRange:
                    rangeName: string
                relativeTimeRange:
                    relativeTime: string
        completeLiteralTimeRange:
            rangeName: string
    title: string
    visualSettings: string
Copy

MetricsSearchV2 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 MetricsSearchV2 resource accepts the following input properties:

Queries This property is required. List<Pulumi.SumoLogic.Inputs.MetricsSearchV2Query>
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
TimeRange This property is required. Pulumi.SumoLogic.Inputs.MetricsSearchV2TimeRange
Time range of the metrics search. See time range schema
Title This property is required. string
Title of the search.
Description string
Description of the search.
FolderId string
The identifier of the folder to create the metrics search in.
VisualSettings string
Queries This property is required. []MetricsSearchV2QueryArgs
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
TimeRange This property is required. MetricsSearchV2TimeRangeArgs
Time range of the metrics search. See time range schema
Title This property is required. string
Title of the search.
Description string
Description of the search.
FolderId string
The identifier of the folder to create the metrics search in.
VisualSettings string
queries This property is required. List<MetricsSearchV2Query>
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
timeRange This property is required. MetricsSearchV2TimeRange
Time range of the metrics search. See time range schema
title This property is required. String
Title of the search.
description String
Description of the search.
folderId String
The identifier of the folder to create the metrics search in.
visualSettings String
queries This property is required. MetricsSearchV2Query[]
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
timeRange This property is required. MetricsSearchV2TimeRange
Time range of the metrics search. See time range schema
title This property is required. string
Title of the search.
description string
Description of the search.
folderId string
The identifier of the folder to create the metrics search in.
visualSettings string
queries This property is required. Sequence[MetricsSearchV2QueryArgs]
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
time_range This property is required. MetricsSearchV2TimeRangeArgs
Time range of the metrics search. See time range schema
title This property is required. str
Title of the search.
description str
Description of the search.
folder_id str
The identifier of the folder to create the metrics search in.
visual_settings str
queries This property is required. List<Property Map>
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
timeRange This property is required. Property Map
Time range of the metrics search. See time range schema
title This property is required. String
Title of the search.
description String
Description of the search.
folderId String
The identifier of the folder to create the metrics search in.
visualSettings String

Outputs

All input properties are implicitly available as output properties. Additionally, the MetricsSearchV2 resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing MetricsSearchV2 Resource

Get an existing MetricsSearchV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: MetricsSearchV2State, opts?: CustomResourceOptions): MetricsSearchV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        folder_id: Optional[str] = None,
        queries: Optional[Sequence[MetricsSearchV2QueryArgs]] = None,
        time_range: Optional[MetricsSearchV2TimeRangeArgs] = None,
        title: Optional[str] = None,
        visual_settings: Optional[str] = None) -> MetricsSearchV2
func GetMetricsSearchV2(ctx *Context, name string, id IDInput, state *MetricsSearchV2State, opts ...ResourceOption) (*MetricsSearchV2, error)
public static MetricsSearchV2 Get(string name, Input<string> id, MetricsSearchV2State? state, CustomResourceOptions? opts = null)
public static MetricsSearchV2 get(String name, Output<String> id, MetricsSearchV2State state, CustomResourceOptions options)
resources:  _:    type: sumologic:MetricsSearchV2    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
Description of the search.
FolderId string
The identifier of the folder to create the metrics search in.
Queries List<Pulumi.SumoLogic.Inputs.MetricsSearchV2Query>
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
TimeRange Pulumi.SumoLogic.Inputs.MetricsSearchV2TimeRange
Time range of the metrics search. See time range schema
Title string
Title of the search.
VisualSettings string
Description string
Description of the search.
FolderId string
The identifier of the folder to create the metrics search in.
Queries []MetricsSearchV2QueryArgs
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
TimeRange MetricsSearchV2TimeRangeArgs
Time range of the metrics search. See time range schema
Title string
Title of the search.
VisualSettings string
description String
Description of the search.
folderId String
The identifier of the folder to create the metrics search in.
queries List<MetricsSearchV2Query>
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
timeRange MetricsSearchV2TimeRange
Time range of the metrics search. See time range schema
title String
Title of the search.
visualSettings String
description string
Description of the search.
folderId string
The identifier of the folder to create the metrics search in.
queries MetricsSearchV2Query[]
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
timeRange MetricsSearchV2TimeRange
Time range of the metrics search. See time range schema
title string
Title of the search.
visualSettings string
description str
Description of the search.
folder_id str
The identifier of the folder to create the metrics search in.
queries Sequence[MetricsSearchV2QueryArgs]
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
time_range MetricsSearchV2TimeRangeArgs
Time range of the metrics search. See time range schema
title str
Title of the search.
visual_settings str
description String
Description of the search.
folderId String
The identifier of the folder to create the metrics search in.
queries List<Property Map>
Array of objects MetricsSearchQueryV2. Metrics queries, up to the maximum of six.
timeRange Property Map
Time range of the metrics search. See time range schema
title String
Title of the search.
visualSettings String

Supporting Types

MetricsSearchV2Query
, MetricsSearchV2QueryArgs

QueryKey This property is required. string
Key for the query row, A to Z letter.
QueryString This property is required. string
A metric query consists of a metric, one or more filters and optionally, one or more Metrics Operators.
QueryType This property is required. string
The type of the query, either Metrics or Logs.
MetricsQueryMode string
Will ONLY be specified for metrics queries. The provider only supports Advanced as metrics query mode.
QueryKey This property is required. string
Key for the query row, A to Z letter.
QueryString This property is required. string
A metric query consists of a metric, one or more filters and optionally, one or more Metrics Operators.
QueryType This property is required. string
The type of the query, either Metrics or Logs.
MetricsQueryMode string
Will ONLY be specified for metrics queries. The provider only supports Advanced as metrics query mode.
queryKey This property is required. String
Key for the query row, A to Z letter.
queryString This property is required. String
A metric query consists of a metric, one or more filters and optionally, one or more Metrics Operators.
queryType This property is required. String
The type of the query, either Metrics or Logs.
metricsQueryMode String
Will ONLY be specified for metrics queries. The provider only supports Advanced as metrics query mode.
queryKey This property is required. string
Key for the query row, A to Z letter.
queryString This property is required. string
A metric query consists of a metric, one or more filters and optionally, one or more Metrics Operators.
queryType This property is required. string
The type of the query, either Metrics or Logs.
metricsQueryMode string
Will ONLY be specified for metrics queries. The provider only supports Advanced as metrics query mode.
query_key This property is required. str
Key for the query row, A to Z letter.
query_string This property is required. str
A metric query consists of a metric, one or more filters and optionally, one or more Metrics Operators.
query_type This property is required. str
The type of the query, either Metrics or Logs.
metrics_query_mode str
Will ONLY be specified for metrics queries. The provider only supports Advanced as metrics query mode.
queryKey This property is required. String
Key for the query row, A to Z letter.
queryString This property is required. String
A metric query consists of a metric, one or more filters and optionally, one or more Metrics Operators.
queryType This property is required. String
The type of the query, either Metrics or Logs.
metricsQueryMode String
Will ONLY be specified for metrics queries. The provider only supports Advanced as metrics query mode.

MetricsSearchV2TimeRange
, MetricsSearchV2TimeRangeArgs

BeginBoundedTimeRange Pulumi.SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRange
Bounded time range. See begin_bounded_time_range schema schema for details.
CompleteLiteralTimeRange Pulumi.SumoLogic.Inputs.MetricsSearchV2TimeRangeCompleteLiteralTimeRange
Literal time range. See complete_literal_time_range schema for details.
BeginBoundedTimeRange MetricsSearchV2TimeRangeBeginBoundedTimeRange
Bounded time range. See begin_bounded_time_range schema schema for details.
CompleteLiteralTimeRange MetricsSearchV2TimeRangeCompleteLiteralTimeRange
Literal time range. See complete_literal_time_range schema for details.
beginBoundedTimeRange MetricsSearchV2TimeRangeBeginBoundedTimeRange
Bounded time range. See begin_bounded_time_range schema schema for details.
completeLiteralTimeRange MetricsSearchV2TimeRangeCompleteLiteralTimeRange
Literal time range. See complete_literal_time_range schema for details.
beginBoundedTimeRange MetricsSearchV2TimeRangeBeginBoundedTimeRange
Bounded time range. See begin_bounded_time_range schema schema for details.
completeLiteralTimeRange MetricsSearchV2TimeRangeCompleteLiteralTimeRange
Literal time range. See complete_literal_time_range schema for details.
begin_bounded_time_range MetricsSearchV2TimeRangeBeginBoundedTimeRange
Bounded time range. See begin_bounded_time_range schema schema for details.
complete_literal_time_range MetricsSearchV2TimeRangeCompleteLiteralTimeRange
Literal time range. See complete_literal_time_range schema for details.
beginBoundedTimeRange Property Map
Bounded time range. See begin_bounded_time_range schema schema for details.
completeLiteralTimeRange Property Map
Literal time range. See complete_literal_time_range schema for details.

MetricsSearchV2TimeRangeBeginBoundedTimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeArgs

From This property is required. Pulumi.SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeFrom
Start boundary of bounded time range. See time_range_boundary schema for details.
To Pulumi.SumoLogic.Inputs.MetricsSearchV2TimeRangeBeginBoundedTimeRangeTo
End boundary of bounded time range. See time_range_boundary schema for details.
From This property is required. MetricsSearchV2TimeRangeBeginBoundedTimeRangeFrom
Start boundary of bounded time range. See time_range_boundary schema for details.
To MetricsSearchV2TimeRangeBeginBoundedTimeRangeTo
End boundary of bounded time range. See time_range_boundary schema for details.
from This property is required. MetricsSearchV2TimeRangeBeginBoundedTimeRangeFrom
Start boundary of bounded time range. See time_range_boundary schema for details.
to MetricsSearchV2TimeRangeBeginBoundedTimeRangeTo
End boundary of bounded time range. See time_range_boundary schema for details.
from This property is required. MetricsSearchV2TimeRangeBeginBoundedTimeRangeFrom
Start boundary of bounded time range. See time_range_boundary schema for details.
to MetricsSearchV2TimeRangeBeginBoundedTimeRangeTo
End boundary of bounded time range. See time_range_boundary schema for details.
from_ This property is required. MetricsSearchV2TimeRangeBeginBoundedTimeRangeFrom
Start boundary of bounded time range. See time_range_boundary schema for details.
to MetricsSearchV2TimeRangeBeginBoundedTimeRangeTo
End boundary of bounded time range. See time_range_boundary schema for details.
from This property is required. Property Map
Start boundary of bounded time range. See time_range_boundary schema for details.
to Property Map
End boundary of bounded time range. See time_range_boundary schema for details.

MetricsSearchV2TimeRangeBeginBoundedTimeRangeFrom
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromArgs

epochTimeRange Property Map
Time since the epoch.
iso8601TimeRange Property Map
Time in ISO 8601 format.
literalTimeRange Property Map
Time in literal format.
relativeTimeRange Property Map
Time in relative format.

MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromEpochTimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromEpochTimeRangeArgs

EpochMillis This property is required. int
Time as a number of milliseconds since the epoch.
EpochMillis This property is required. int
Time as a number of milliseconds since the epoch.
epochMillis This property is required. Integer
Time as a number of milliseconds since the epoch.
epochMillis This property is required. number
Time as a number of milliseconds since the epoch.
epoch_millis This property is required. int
Time as a number of milliseconds since the epoch.
epochMillis This property is required. Number
Time as a number of milliseconds since the epoch.

MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromIso8601TimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromIso8601TimeRangeArgs

Iso8601Time This property is required. string
Time as a string in ISO 8601 format.
Iso8601Time This property is required. string
Time as a string in ISO 8601 format.
iso8601Time This property is required. String
Time as a string in ISO 8601 format.
iso8601Time This property is required. string
Time as a string in ISO 8601 format.
iso8601_time This property is required. str
Time as a string in ISO 8601 format.
iso8601Time This property is required. String
Time as a string in ISO 8601 format.

MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromLiteralTimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs

RangeName This property is required. string
RangeName This property is required. string
rangeName This property is required. String
rangeName This property is required. string
range_name This property is required. str
rangeName This property is required. String

MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs

RelativeTime This property is required. string

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

RelativeTime This property is required. string

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

relativeTime This property is required. String

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

relativeTime This property is required. string

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

relative_time This property is required. str

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

relativeTime This property is required. String

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

MetricsSearchV2TimeRangeBeginBoundedTimeRangeTo
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeToArgs

epochTimeRange Property Map
Time since the epoch.
iso8601TimeRange Property Map
Time in ISO 8601 format.
literalTimeRange Property Map
Time in literal format.
relativeTimeRange Property Map
Time in relative format.

MetricsSearchV2TimeRangeBeginBoundedTimeRangeToEpochTimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeToEpochTimeRangeArgs

EpochMillis This property is required. int
Time as a number of milliseconds since the epoch.
EpochMillis This property is required. int
Time as a number of milliseconds since the epoch.
epochMillis This property is required. Integer
Time as a number of milliseconds since the epoch.
epochMillis This property is required. number
Time as a number of milliseconds since the epoch.
epoch_millis This property is required. int
Time as a number of milliseconds since the epoch.
epochMillis This property is required. Number
Time as a number of milliseconds since the epoch.

MetricsSearchV2TimeRangeBeginBoundedTimeRangeToIso8601TimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeToIso8601TimeRangeArgs

Iso8601Time This property is required. string
Time as a string in ISO 8601 format.
Iso8601Time This property is required. string
Time as a string in ISO 8601 format.
iso8601Time This property is required. String
Time as a string in ISO 8601 format.
iso8601Time This property is required. string
Time as a string in ISO 8601 format.
iso8601_time This property is required. str
Time as a string in ISO 8601 format.
iso8601Time This property is required. String
Time as a string in ISO 8601 format.

MetricsSearchV2TimeRangeBeginBoundedTimeRangeToLiteralTimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeToLiteralTimeRangeArgs

RangeName This property is required. string
RangeName This property is required. string
rangeName This property is required. String
rangeName This property is required. string
range_name This property is required. str
rangeName This property is required. String

MetricsSearchV2TimeRangeBeginBoundedTimeRangeToRelativeTimeRange
, MetricsSearchV2TimeRangeBeginBoundedTimeRangeToRelativeTimeRangeArgs

RelativeTime This property is required. string

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

RelativeTime This property is required. string

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

relativeTime This property is required. String

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

relativeTime This property is required. string

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

relative_time This property is required. str

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

relativeTime This property is required. String

Relative time as a string consisting of following elements:

  1. - (optional): minus sign indicates time in the past,
  2. <number>: number of time units,
  3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

MetricsSearchV2TimeRangeCompleteLiteralTimeRange
, MetricsSearchV2TimeRangeCompleteLiteralTimeRangeArgs

RangeName This property is required. string
RangeName This property is required. string
rangeName This property is required. String
rangeName This property is required. string
range_name This property is required. str
rangeName This property is required. String

Import

A metrics search can be imported using it’s identifier, e.g.:

hcl

$ pulumi import sumologic:index/metricsSearchV2:MetricsSearchV2 example_search 0000000007FFD79D
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Sumo Logic pulumi/pulumi-sumologic
License
Apache-2.0
Notes
This Pulumi package is based on the sumologic Terraform Provider.