Launch Darkly v0.0.6 published on Sunday, Feb 19, 2023 by lbrlabs
launchdarkly.getMetric
Explore with Pulumi AI
Provides a LaunchDarkly metric data source.
This data source allows you to retrieve metric information from your LaunchDarkly organization.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Launchdarkly = Pulumi.Launchdarkly;
return await Deployment.RunAsync(() => 
{
    var example = Launchdarkly.GetMetric.Invoke(new()
    {
        Key = "example-metric",
        ProjectKey = "example-project",
    });
});
package main
import (
	"github.com/lbrlabs/pulumi-launchdarkly/sdk/go/launchdarkly"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = launchdarkly.LookupMetric(ctx, &launchdarkly.LookupMetricArgs{
			Key:        "example-metric",
			ProjectKey: "example-project",
		}, nil)
		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.launchdarkly.LaunchdarklyFunctions;
import com.pulumi.launchdarkly.inputs.GetMetricArgs;
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 example = LaunchdarklyFunctions.getMetric(GetMetricArgs.builder()
            .key("example-metric")
            .projectKey("example-project")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as launchdarkly from "@pulumi/launchdarkly";
const example = launchdarkly.getMetric({
    key: "example-metric",
    projectKey: "example-project",
});
import pulumi
import pulumi_launchdarkly as launchdarkly
example = launchdarkly.get_metric(key="example-metric",
    project_key="example-project")
variables:
  example:
    fn::invoke:
      Function: launchdarkly:getMetric
      Arguments:
        key: example-metric
        projectKey: example-project
Using getMetric
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getMetric(args: GetMetricArgs, opts?: InvokeOptions): Promise<GetMetricResult>
function getMetricOutput(args: GetMetricOutputArgs, opts?: InvokeOptions): Output<GetMetricResult>def get_metric(description: Optional[str] = None,
               event_key: Optional[str] = None,
               is_active: Optional[bool] = None,
               is_numeric: Optional[bool] = None,
               key: Optional[str] = None,
               kind: Optional[str] = None,
               maintainer_id: Optional[str] = None,
               name: Optional[str] = None,
               project_key: Optional[str] = None,
               selector: Optional[str] = None,
               success_criteria: Optional[str] = None,
               tags: Optional[Sequence[str]] = None,
               unit: Optional[str] = None,
               urls: Optional[Sequence[GetMetricUrl]] = None,
               opts: Optional[InvokeOptions] = None) -> GetMetricResult
def get_metric_output(description: Optional[pulumi.Input[str]] = None,
               event_key: Optional[pulumi.Input[str]] = None,
               is_active: Optional[pulumi.Input[bool]] = None,
               is_numeric: Optional[pulumi.Input[bool]] = None,
               key: Optional[pulumi.Input[str]] = None,
               kind: Optional[pulumi.Input[str]] = None,
               maintainer_id: Optional[pulumi.Input[str]] = None,
               name: Optional[pulumi.Input[str]] = None,
               project_key: Optional[pulumi.Input[str]] = None,
               selector: Optional[pulumi.Input[str]] = None,
               success_criteria: Optional[pulumi.Input[str]] = None,
               tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               unit: Optional[pulumi.Input[str]] = None,
               urls: Optional[pulumi.Input[Sequence[pulumi.Input[GetMetricUrlArgs]]]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetMetricResult]func LookupMetric(ctx *Context, args *LookupMetricArgs, opts ...InvokeOption) (*LookupMetricResult, error)
func LookupMetricOutput(ctx *Context, args *LookupMetricOutputArgs, opts ...InvokeOption) LookupMetricResultOutput> Note: This function is named LookupMetric in the Go SDK.
public static class GetMetric 
{
    public static Task<GetMetricResult> InvokeAsync(GetMetricArgs args, InvokeOptions? opts = null)
    public static Output<GetMetricResult> Invoke(GetMetricInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMetricResult> getMetric(GetMetricArgs args, InvokeOptions options)
public static Output<GetMetricResult> getMetric(GetMetricArgs args, InvokeOptions options)
fn::invoke:
  function: launchdarkly:index/getMetric:getMetric
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Key string
 - The metric's unique key.
 - Project
Key string - The metric's project key.
 - Description string
 - The description of the metric's purpose.
 - Event
Key string - The event key to watch for 
custommetrics. - Is
Active bool - Is
Numeric bool - Kind string
 - The metric type. Available choices are 
click,custom, andpageview. - Maintainer
Id string - Name string
 - The name of the metric.
 - Selector string
 - The CSS selector for 
clickmetrics. - Success
Criteria string - The success criteria for numeric 
custommetrics. - List<string>
 - Set of tags associated with the metric.
 - Unit string
 - The unit for numeric 
custommetrics. - Urls
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Get Metric Url>  - Which URLs the metric watches.
 
- Key string
 - The metric's unique key.
 - Project
Key string - The metric's project key.
 - Description string
 - The description of the metric's purpose.
 - Event
Key string - The event key to watch for 
custommetrics. - Is
Active bool - Is
Numeric bool - Kind string
 - The metric type. Available choices are 
click,custom, andpageview. - Maintainer
Id string - Name string
 - The name of the metric.
 - Selector string
 - The CSS selector for 
clickmetrics. - Success
Criteria string - The success criteria for numeric 
custommetrics. - []string
 - Set of tags associated with the metric.
 - Unit string
 - The unit for numeric 
custommetrics. - Urls
[]Get
Metric Url  - Which URLs the metric watches.
 
- key String
 - The metric's unique key.
 - project
Key String - The metric's project key.
 - description String
 - The description of the metric's purpose.
 - event
Key String - The event key to watch for 
custommetrics. - is
Active Boolean - is
Numeric Boolean - kind String
 - The metric type. Available choices are 
click,custom, andpageview. - maintainer
Id String - name String
 - The name of the metric.
 - selector String
 - The CSS selector for 
clickmetrics. - success
Criteria String - The success criteria for numeric 
custommetrics. - List<String>
 - Set of tags associated with the metric.
 - unit String
 - The unit for numeric 
custommetrics. - urls
List<Get
Metric Url>  - Which URLs the metric watches.
 
- key string
 - The metric's unique key.
 - project
Key string - The metric's project key.
 - description string
 - The description of the metric's purpose.
 - event
Key string - The event key to watch for 
custommetrics. - is
Active boolean - is
Numeric boolean - kind string
 - The metric type. Available choices are 
click,custom, andpageview. - maintainer
Id string - name string
 - The name of the metric.
 - selector string
 - The CSS selector for 
clickmetrics. - success
Criteria string - The success criteria for numeric 
custommetrics. - string[]
 - Set of tags associated with the metric.
 - unit string
 - The unit for numeric 
custommetrics. - urls
Get
Metric Url[]  - Which URLs the metric watches.
 
- key str
 - The metric's unique key.
 - project_
key str - The metric's project key.
 - description str
 - The description of the metric's purpose.
 - event_
key str - The event key to watch for 
custommetrics. - is_
active bool - is_
numeric bool - kind str
 - The metric type. Available choices are 
click,custom, andpageview. - maintainer_
id str - name str
 - The name of the metric.
 - selector str
 - The CSS selector for 
clickmetrics. - success_
criteria str - The success criteria for numeric 
custommetrics. - Sequence[str]
 - Set of tags associated with the metric.
 - unit str
 - The unit for numeric 
custommetrics. - urls
Sequence[Get
Metric Url]  - Which URLs the metric watches.
 
- key String
 - The metric's unique key.
 - project
Key String - The metric's project key.
 - description String
 - The description of the metric's purpose.
 - event
Key String - The event key to watch for 
custommetrics. - is
Active Boolean - is
Numeric Boolean - kind String
 - The metric type. Available choices are 
click,custom, andpageview. - maintainer
Id String - name String
 - The name of the metric.
 - selector String
 - The CSS selector for 
clickmetrics. - success
Criteria String - The success criteria for numeric 
custommetrics. - List<String>
 - Set of tags associated with the metric.
 - unit String
 - The unit for numeric 
custommetrics. - urls List<Property Map>
 - Which URLs the metric watches.
 
getMetric Result
The following output properties are available:
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Key string
 - Maintainer
Id string - Project
Key string - The metrics's project key.
 - Description string
 - The description of the metric's purpose.
 - Event
Key string - The event key to watch for 
custommetrics. - Is
Active bool - Is
Numeric bool - Kind string
 - The metric type. Available choices are 
click,custom, andpageview. - Name string
 - The name of the metric.
 - Selector string
 - The CSS selector for 
clickmetrics. - Success
Criteria string - The success criteria for numeric 
custommetrics. - List<string>
 - Set of tags associated with the metric.
 - Unit string
 - The unit for numeric 
custommetrics. - Urls
List<Lbrlabs.
Pulumi Package. Launchdarkly. Outputs. Get Metric Url>  - Which URLs the metric watches.
 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Key string
 - Maintainer
Id string - Project
Key string - The metrics's project key.
 - Description string
 - The description of the metric's purpose.
 - Event
Key string - The event key to watch for 
custommetrics. - Is
Active bool - Is
Numeric bool - Kind string
 - The metric type. Available choices are 
click,custom, andpageview. - Name string
 - The name of the metric.
 - Selector string
 - The CSS selector for 
clickmetrics. - Success
Criteria string - The success criteria for numeric 
custommetrics. - []string
 - Set of tags associated with the metric.
 - Unit string
 - The unit for numeric 
custommetrics. - Urls
[]Get
Metric Url  - Which URLs the metric watches.
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - key String
 - maintainer
Id String - project
Key String - The metrics's project key.
 - description String
 - The description of the metric's purpose.
 - event
Key String - The event key to watch for 
custommetrics. - is
Active Boolean - is
Numeric Boolean - kind String
 - The metric type. Available choices are 
click,custom, andpageview. - name String
 - The name of the metric.
 - selector String
 - The CSS selector for 
clickmetrics. - success
Criteria String - The success criteria for numeric 
custommetrics. - List<String>
 - Set of tags associated with the metric.
 - unit String
 - The unit for numeric 
custommetrics. - urls
List<Get
Metric Url>  - Which URLs the metric watches.
 
- id string
 - The provider-assigned unique ID for this managed resource.
 - key string
 - maintainer
Id string - project
Key string - The metrics's project key.
 - description string
 - The description of the metric's purpose.
 - event
Key string - The event key to watch for 
custommetrics. - is
Active boolean - is
Numeric boolean - kind string
 - The metric type. Available choices are 
click,custom, andpageview. - name string
 - The name of the metric.
 - selector string
 - The CSS selector for 
clickmetrics. - success
Criteria string - The success criteria for numeric 
custommetrics. - string[]
 - Set of tags associated with the metric.
 - unit string
 - The unit for numeric 
custommetrics. - urls
Get
Metric Url[]  - Which URLs the metric watches.
 
- id str
 - The provider-assigned unique ID for this managed resource.
 - key str
 - maintainer_
id str - project_
key str - The metrics's project key.
 - description str
 - The description of the metric's purpose.
 - event_
key str - The event key to watch for 
custommetrics. - is_
active bool - is_
numeric bool - kind str
 - The metric type. Available choices are 
click,custom, andpageview. - name str
 - The name of the metric.
 - selector str
 - The CSS selector for 
clickmetrics. - success_
criteria str - The success criteria for numeric 
custommetrics. - Sequence[str]
 - Set of tags associated with the metric.
 - unit str
 - The unit for numeric 
custommetrics. - urls
Sequence[Get
Metric Url]  - Which URLs the metric watches.
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - key String
 - maintainer
Id String - project
Key String - The metrics's project key.
 - description String
 - The description of the metric's purpose.
 - event
Key String - The event key to watch for 
custommetrics. - is
Active Boolean - is
Numeric Boolean - kind String
 - The metric type. Available choices are 
click,custom, andpageview. - name String
 - The name of the metric.
 - selector String
 - The CSS selector for 
clickmetrics. - success
Criteria String - The success criteria for numeric 
custommetrics. - List<String>
 - Set of tags associated with the metric.
 - unit String
 - The unit for numeric 
custommetrics. - urls List<Property Map>
 - Which URLs the metric watches.
 
Supporting Types
GetMetricUrl  
Package Details
- Repository
 - launchdarkly lbrlabs/pulumi-launchdarkly
 - License
 - Notes
 - This Pulumi package is based on the 
launchdarklyTerraform Provider.