1. Packages
  2. Wavefront Provider
  3. API Docs
  4. DerivedMetric
Wavefront v3.1.6 published on Thursday, Oct 31, 2024 by Pulumi

wavefront.DerivedMetric

Explore with Pulumi AI

wavefront logo
Wavefront v3.1.6 published on Thursday, Oct 31, 2024 by Pulumi

    Provides a Wavefront Derived Metric Resource. This allows derived metrics to be created, updated, and deleted.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as wavefront from "@pulumi/wavefront";
    
    const derived = new wavefront.DerivedMetric("derived", {
        name: "dummy derived metric",
        minutes: 5,
        query: "aliasMetric(5, \"some.metric\")",
    });
    
    import pulumi
    import pulumi_wavefront as wavefront
    
    derived = wavefront.DerivedMetric("derived",
        name="dummy derived metric",
        minutes=5,
        query="aliasMetric(5, \"some.metric\")")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-wavefront/sdk/v3/go/wavefront"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := wavefront.NewDerivedMetric(ctx, "derived", &wavefront.DerivedMetricArgs{
    			Name:    pulumi.String("dummy derived metric"),
    			Minutes: pulumi.Int(5),
    			Query:   pulumi.String("aliasMetric(5, \"some.metric\")"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Wavefront = Pulumi.Wavefront;
    
    return await Deployment.RunAsync(() => 
    {
        var derived = new Wavefront.DerivedMetric("derived", new()
        {
            Name = "dummy derived metric",
            Minutes = 5,
            Query = "aliasMetric(5, \"some.metric\")",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.wavefront.DerivedMetric;
    import com.pulumi.wavefront.DerivedMetricArgs;
    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 derived = new DerivedMetric("derived", DerivedMetricArgs.builder()
                .name("dummy derived metric")
                .minutes(5)
                .query("aliasMetric(5, \"some.metric\")")
                .build());
    
        }
    }
    
    resources:
      derived:
        type: wavefront:DerivedMetric
        properties:
          name: dummy derived metric
          minutes: 5
          query: aliasMetric(5, "some.metric")
    

    Create DerivedMetric Resource

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

    Constructor syntax

    new DerivedMetric(name: string, args: DerivedMetricArgs, opts?: CustomResourceOptions);
    @overload
    def DerivedMetric(resource_name: str,
                      args: DerivedMetricArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def DerivedMetric(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      minutes: Optional[int] = None,
                      query: Optional[str] = None,
                      additional_information: Optional[str] = None,
                      name: Optional[str] = None,
                      tags: Optional[Sequence[str]] = None)
    func NewDerivedMetric(ctx *Context, name string, args DerivedMetricArgs, opts ...ResourceOption) (*DerivedMetric, error)
    public DerivedMetric(string name, DerivedMetricArgs args, CustomResourceOptions? opts = null)
    public DerivedMetric(String name, DerivedMetricArgs args)
    public DerivedMetric(String name, DerivedMetricArgs args, CustomResourceOptions options)
    
    type: wavefront:DerivedMetric
    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 DerivedMetricArgs
    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 DerivedMetricArgs
    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 DerivedMetricArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DerivedMetricArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DerivedMetricArgs
    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 derivedMetricResource = new Wavefront.DerivedMetric("derivedMetricResource", new()
    {
        Minutes = 0,
        Query = "string",
        AdditionalInformation = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := wavefront.NewDerivedMetric(ctx, "derivedMetricResource", &wavefront.DerivedMetricArgs{
    	Minutes:               pulumi.Int(0),
    	Query:                 pulumi.String("string"),
    	AdditionalInformation: pulumi.String("string"),
    	Name:                  pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var derivedMetricResource = new DerivedMetric("derivedMetricResource", DerivedMetricArgs.builder()
        .minutes(0)
        .query("string")
        .additionalInformation("string")
        .name("string")
        .tags("string")
        .build());
    
    derived_metric_resource = wavefront.DerivedMetric("derivedMetricResource",
        minutes=0,
        query="string",
        additional_information="string",
        name="string",
        tags=["string"])
    
    const derivedMetricResource = new wavefront.DerivedMetric("derivedMetricResource", {
        minutes: 0,
        query: "string",
        additionalInformation: "string",
        name: "string",
        tags: ["string"],
    });
    
    type: wavefront:DerivedMetric
    properties:
        additionalInformation: string
        minutes: 0
        name: string
        query: string
        tags:
            - string
    

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

    Minutes int
    How frequently the query generating the derived metric is run.
    Query string
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    AdditionalInformation string
    User-supplied additional explanatory information for the derived metric.
    Name string
    The name of the Derived Metric in Wavefront.
    Tags List<string>
    A set of tags to assign to this resource.
    Minutes int
    How frequently the query generating the derived metric is run.
    Query string
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    AdditionalInformation string
    User-supplied additional explanatory information for the derived metric.
    Name string
    The name of the Derived Metric in Wavefront.
    Tags []string
    A set of tags to assign to this resource.
    minutes Integer
    How frequently the query generating the derived metric is run.
    query String
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    additionalInformation String
    User-supplied additional explanatory information for the derived metric.
    name String
    The name of the Derived Metric in Wavefront.
    tags List<String>
    A set of tags to assign to this resource.
    minutes number
    How frequently the query generating the derived metric is run.
    query string
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    additionalInformation string
    User-supplied additional explanatory information for the derived metric.
    name string
    The name of the Derived Metric in Wavefront.
    tags string[]
    A set of tags to assign to this resource.
    minutes int
    How frequently the query generating the derived metric is run.
    query str
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    additional_information str
    User-supplied additional explanatory information for the derived metric.
    name str
    The name of the Derived Metric in Wavefront.
    tags Sequence[str]
    A set of tags to assign to this resource.
    minutes Number
    How frequently the query generating the derived metric is run.
    query String
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    additionalInformation String
    User-supplied additional explanatory information for the derived metric.
    name String
    The name of the Derived Metric in Wavefront.
    tags List<String>
    A set of tags to assign to this resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DerivedMetric 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 DerivedMetric Resource

    Get an existing DerivedMetric 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?: DerivedMetricState, opts?: CustomResourceOptions): DerivedMetric
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            additional_information: Optional[str] = None,
            minutes: Optional[int] = None,
            name: Optional[str] = None,
            query: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> DerivedMetric
    func GetDerivedMetric(ctx *Context, name string, id IDInput, state *DerivedMetricState, opts ...ResourceOption) (*DerivedMetric, error)
    public static DerivedMetric Get(string name, Input<string> id, DerivedMetricState? state, CustomResourceOptions? opts = null)
    public static DerivedMetric get(String name, Output<String> id, DerivedMetricState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    AdditionalInformation string
    User-supplied additional explanatory information for the derived metric.
    Minutes int
    How frequently the query generating the derived metric is run.
    Name string
    The name of the Derived Metric in Wavefront.
    Query string
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    Tags List<string>
    A set of tags to assign to this resource.
    AdditionalInformation string
    User-supplied additional explanatory information for the derived metric.
    Minutes int
    How frequently the query generating the derived metric is run.
    Name string
    The name of the Derived Metric in Wavefront.
    Query string
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    Tags []string
    A set of tags to assign to this resource.
    additionalInformation String
    User-supplied additional explanatory information for the derived metric.
    minutes Integer
    How frequently the query generating the derived metric is run.
    name String
    The name of the Derived Metric in Wavefront.
    query String
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    tags List<String>
    A set of tags to assign to this resource.
    additionalInformation string
    User-supplied additional explanatory information for the derived metric.
    minutes number
    How frequently the query generating the derived metric is run.
    name string
    The name of the Derived Metric in Wavefront.
    query string
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    tags string[]
    A set of tags to assign to this resource.
    additional_information str
    User-supplied additional explanatory information for the derived metric.
    minutes int
    How frequently the query generating the derived metric is run.
    name str
    The name of the Derived Metric in Wavefront.
    query str
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    tags Sequence[str]
    A set of tags to assign to this resource.
    additionalInformation String
    User-supplied additional explanatory information for the derived metric.
    minutes Number
    How frequently the query generating the derived metric is run.
    name String
    The name of the Derived Metric in Wavefront.
    query String
    A Wavefront query that is evaluated at regular intervals (default is 1 minute).
    tags List<String>
    A set of tags to assign to this resource.

    Import

    Derived Metrics can be imported by using the id, e.g.:

    $ pulumi import wavefront:index/derivedMetric:DerivedMetric derived_metric 1577102900578
    

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

    Package Details

    Repository
    Wavefront pulumi/pulumi-wavefront
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the wavefront Terraform Provider.
    wavefront logo
    Wavefront v3.1.6 published on Thursday, Oct 31, 2024 by Pulumi