1. Packages
  2. Aptible Provider
  3. API Docs
  4. MetricDrain
aptible 0.9.12 published on Monday, Apr 14, 2025 by aptible

aptible.MetricDrain

Explore with Pulumi AI

aptible logo
aptible 0.9.12 published on Monday, Apr 14, 2025 by aptible

    # Aptible Metric Drain Resource

    This resource is used to create and manage Metric Drains running on Aptible Deploy.

    Example Usage

    Aptible InfluxDB Database

    import * as pulumi from "@pulumi/pulumi";
    import * as aptible from "@pulumi/aptible";
    
    const influxdbDatabaseDrain = new aptible.MetricDrain("influxdbDatabaseDrain", {
        envId: data.aptible_environment.example.env_id,
        databaseId: aptible_database.example.database_id,
        drainType: "influxdb_database",
        handle: "aptible-hosted-metric-drain",
    });
    
    import pulumi
    import pulumi_aptible as aptible
    
    influxdb_database_drain = aptible.MetricDrain("influxdbDatabaseDrain",
        env_id=data["aptible_environment"]["example"]["env_id"],
        database_id=aptible_database["example"]["database_id"],
        drain_type="influxdb_database",
        handle="aptible-hosted-metric-drain")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/aptible/aptible"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aptible.NewMetricDrain(ctx, "influxdbDatabaseDrain", &aptible.MetricDrainArgs{
    			EnvId:      pulumi.Any(data.Aptible_environment.Example.Env_id),
    			DatabaseId: pulumi.Any(aptible_database.Example.Database_id),
    			DrainType:  pulumi.String("influxdb_database"),
    			Handle:     pulumi.String("aptible-hosted-metric-drain"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aptible = Pulumi.Aptible;
    
    return await Deployment.RunAsync(() => 
    {
        var influxdbDatabaseDrain = new Aptible.MetricDrain("influxdbDatabaseDrain", new()
        {
            EnvId = data.Aptible_environment.Example.Env_id,
            DatabaseId = aptible_database.Example.Database_id,
            DrainType = "influxdb_database",
            Handle = "aptible-hosted-metric-drain",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aptible.MetricDrain;
    import com.pulumi.aptible.MetricDrainArgs;
    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 influxdbDatabaseDrain = new MetricDrain("influxdbDatabaseDrain", MetricDrainArgs.builder()
                .envId(data.aptible_environment().example().env_id())
                .databaseId(aptible_database.example().database_id())
                .drainType("influxdb_database")
                .handle("aptible-hosted-metric-drain")
                .build());
    
        }
    }
    
    resources:
      influxdbDatabaseDrain:
        type: aptible:MetricDrain
        properties:
          envId: ${data.aptible_environment.example.env_id}
          databaseId: ${aptible_database.example.database_id}
          drainType: influxdb_database
          handle: aptible-hosted-metric-drain
    

    InfluxDB (v1)

    import * as pulumi from "@pulumi/pulumi";
    import * as aptible from "@pulumi/aptible";
    
    const influxdbDrain = new aptible.MetricDrain("influxdbDrain", {
        envId: data.aptible_environment.example.env_id,
        drainType: "influxdb",
        handle: "influxdb-metric-drain",
        url: "https://influx.example.com:443",
        username: "example_user",
        password: "example_password",
        database: "metrics",
    });
    
    import pulumi
    import pulumi_aptible as aptible
    
    influxdb_drain = aptible.MetricDrain("influxdbDrain",
        env_id=data["aptible_environment"]["example"]["env_id"],
        drain_type="influxdb",
        handle="influxdb-metric-drain",
        url="https://influx.example.com:443",
        username="example_user",
        password="example_password",
        database="metrics")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/aptible/aptible"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aptible.NewMetricDrain(ctx, "influxdbDrain", &aptible.MetricDrainArgs{
    			EnvId:     pulumi.Any(data.Aptible_environment.Example.Env_id),
    			DrainType: pulumi.String("influxdb"),
    			Handle:    pulumi.String("influxdb-metric-drain"),
    			Url:       pulumi.String("https://influx.example.com:443"),
    			Username:  pulumi.String("example_user"),
    			Password:  pulumi.String("example_password"),
    			Database:  pulumi.String("metrics"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aptible = Pulumi.Aptible;
    
    return await Deployment.RunAsync(() => 
    {
        var influxdbDrain = new Aptible.MetricDrain("influxdbDrain", new()
        {
            EnvId = data.Aptible_environment.Example.Env_id,
            DrainType = "influxdb",
            Handle = "influxdb-metric-drain",
            Url = "https://influx.example.com:443",
            Username = "example_user",
            Password = "example_password",
            Database = "metrics",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aptible.MetricDrain;
    import com.pulumi.aptible.MetricDrainArgs;
    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 influxdbDrain = new MetricDrain("influxdbDrain", MetricDrainArgs.builder()
                .envId(data.aptible_environment().example().env_id())
                .drainType("influxdb")
                .handle("influxdb-metric-drain")
                .url("https://influx.example.com:443")
                .username("example_user")
                .password("example_password")
                .database("metrics")
                .build());
    
        }
    }
    
    resources:
      influxdbDrain:
        type: aptible:MetricDrain
        properties:
          envId: ${data.aptible_environment.example.env_id}
          drainType: influxdb
          handle: influxdb-metric-drain
          url: https://influx.example.com:443
          username: example_user
          password: example_password
          database: metrics
    

    InfluxDB (v2)

    import * as pulumi from "@pulumi/pulumi";
    import * as aptible from "@pulumi/aptible";
    
    const influxdbDrain = new aptible.MetricDrain("influxdbDrain", {
        envId: data.aptible_environment.example.env_id,
        drainType: "influxdb2",
        handle: "influxdb-metric-drain",
        url: "https://influx.example.com:443",
        apiKey: "xxxxx-xxxxx-xxxxx",
        bucket: "yourBucket",
        organization: "myOrg",
    });
    
    import pulumi
    import pulumi_aptible as aptible
    
    influxdb_drain = aptible.MetricDrain("influxdbDrain",
        env_id=data["aptible_environment"]["example"]["env_id"],
        drain_type="influxdb2",
        handle="influxdb-metric-drain",
        url="https://influx.example.com:443",
        api_key="xxxxx-xxxxx-xxxxx",
        bucket="yourBucket",
        organization="myOrg")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/aptible/aptible"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aptible.NewMetricDrain(ctx, "influxdbDrain", &aptible.MetricDrainArgs{
    			EnvId:        pulumi.Any(data.Aptible_environment.Example.Env_id),
    			DrainType:    pulumi.String("influxdb2"),
    			Handle:       pulumi.String("influxdb-metric-drain"),
    			Url:          pulumi.String("https://influx.example.com:443"),
    			ApiKey:       pulumi.String("xxxxx-xxxxx-xxxxx"),
    			Bucket:       pulumi.String("yourBucket"),
    			Organization: pulumi.String("myOrg"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aptible = Pulumi.Aptible;
    
    return await Deployment.RunAsync(() => 
    {
        var influxdbDrain = new Aptible.MetricDrain("influxdbDrain", new()
        {
            EnvId = data.Aptible_environment.Example.Env_id,
            DrainType = "influxdb2",
            Handle = "influxdb-metric-drain",
            Url = "https://influx.example.com:443",
            ApiKey = "xxxxx-xxxxx-xxxxx",
            Bucket = "yourBucket",
            Organization = "myOrg",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aptible.MetricDrain;
    import com.pulumi.aptible.MetricDrainArgs;
    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 influxdbDrain = new MetricDrain("influxdbDrain", MetricDrainArgs.builder()
                .envId(data.aptible_environment().example().env_id())
                .drainType("influxdb2")
                .handle("influxdb-metric-drain")
                .url("https://influx.example.com:443")
                .apiKey("xxxxx-xxxxx-xxxxx")
                .bucket("yourBucket")
                .organization("myOrg")
                .build());
    
        }
    }
    
    resources:
      influxdbDrain:
        type: aptible:MetricDrain
        properties:
          envId: ${data.aptible_environment.example.env_id}
          drainType: influxdb2
          handle: influxdb-metric-drain
          url: https://influx.example.com:443
          apiKey: xxxxx-xxxxx-xxxxx
          bucket: yourBucket
          organization: myOrg
    

    Datadog

    import * as pulumi from "@pulumi/pulumi";
    import * as aptible from "@pulumi/aptible";
    
    const datadogDrain = new aptible.MetricDrain("datadogDrain", {
        envId: data.aptible_environment.example.env_id,
        drainType: "datadog",
        apiKey: "xxxxx-xxxxx-xxxxx",
    });
    
    import pulumi
    import pulumi_aptible as aptible
    
    datadog_drain = aptible.MetricDrain("datadogDrain",
        env_id=data["aptible_environment"]["example"]["env_id"],
        drain_type="datadog",
        api_key="xxxxx-xxxxx-xxxxx")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/aptible/aptible"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aptible.NewMetricDrain(ctx, "datadogDrain", &aptible.MetricDrainArgs{
    			EnvId:     pulumi.Any(data.Aptible_environment.Example.Env_id),
    			DrainType: pulumi.String("datadog"),
    			ApiKey:    pulumi.String("xxxxx-xxxxx-xxxxx"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aptible = Pulumi.Aptible;
    
    return await Deployment.RunAsync(() => 
    {
        var datadogDrain = new Aptible.MetricDrain("datadogDrain", new()
        {
            EnvId = data.Aptible_environment.Example.Env_id,
            DrainType = "datadog",
            ApiKey = "xxxxx-xxxxx-xxxxx",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aptible.MetricDrain;
    import com.pulumi.aptible.MetricDrainArgs;
    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 datadogDrain = new MetricDrain("datadogDrain", MetricDrainArgs.builder()
                .envId(data.aptible_environment().example().env_id())
                .drainType("datadog")
                .apiKey("xxxxx-xxxxx-xxxxx")
                .build());
    
        }
    }
    
    resources:
      datadogDrain:
        type: aptible:MetricDrain
        properties:
          envId: ${data.aptible_environment.example.env_id}
          drainType: datadog
          apiKey: xxxxx-xxxxx-xxxxx
    

    Create MetricDrain Resource

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

    Constructor syntax

    new MetricDrain(name: string, args: MetricDrainArgs, opts?: CustomResourceOptions);
    @overload
    def MetricDrain(resource_name: str,
                    args: MetricDrainArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricDrain(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    drain_type: Optional[str] = None,
                    handle: Optional[str] = None,
                    env_id: Optional[float] = None,
                    database: Optional[str] = None,
                    database_id: Optional[float] = None,
                    api_key: Optional[str] = None,
                    bucket: Optional[str] = None,
                    aptible_metric_drain_id: Optional[str] = None,
                    organization: Optional[str] = None,
                    password: Optional[str] = None,
                    series_url: Optional[str] = None,
                    url: Optional[str] = None,
                    username: Optional[str] = None)
    func NewMetricDrain(ctx *Context, name string, args MetricDrainArgs, opts ...ResourceOption) (*MetricDrain, error)
    public MetricDrain(string name, MetricDrainArgs args, CustomResourceOptions? opts = null)
    public MetricDrain(String name, MetricDrainArgs args)
    public MetricDrain(String name, MetricDrainArgs args, CustomResourceOptions options)
    
    type: aptible:MetricDrain
    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 MetricDrainArgs
    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 MetricDrainArgs
    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 MetricDrainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricDrainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricDrainArgs
    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 metricDrainResource = new Aptible.MetricDrain("metricDrainResource", new()
    {
        DrainType = "string",
        Handle = "string",
        EnvId = 0,
        Database = "string",
        DatabaseId = 0,
        ApiKey = "string",
        Bucket = "string",
        AptibleMetricDrainId = "string",
        Organization = "string",
        Password = "string",
        SeriesUrl = "string",
        Url = "string",
        Username = "string",
    });
    
    example, err := aptible.NewMetricDrain(ctx, "metricDrainResource", &aptible.MetricDrainArgs{
    	DrainType:            pulumi.String("string"),
    	Handle:               pulumi.String("string"),
    	EnvId:                pulumi.Float64(0),
    	Database:             pulumi.String("string"),
    	DatabaseId:           pulumi.Float64(0),
    	ApiKey:               pulumi.String("string"),
    	Bucket:               pulumi.String("string"),
    	AptibleMetricDrainId: pulumi.String("string"),
    	Organization:         pulumi.String("string"),
    	Password:             pulumi.String("string"),
    	SeriesUrl:            pulumi.String("string"),
    	Url:                  pulumi.String("string"),
    	Username:             pulumi.String("string"),
    })
    
    var metricDrainResource = new MetricDrain("metricDrainResource", MetricDrainArgs.builder()
        .drainType("string")
        .handle("string")
        .envId(0)
        .database("string")
        .databaseId(0)
        .apiKey("string")
        .bucket("string")
        .aptibleMetricDrainId("string")
        .organization("string")
        .password("string")
        .seriesUrl("string")
        .url("string")
        .username("string")
        .build());
    
    metric_drain_resource = aptible.MetricDrain("metricDrainResource",
        drain_type="string",
        handle="string",
        env_id=0,
        database="string",
        database_id=0,
        api_key="string",
        bucket="string",
        aptible_metric_drain_id="string",
        organization="string",
        password="string",
        series_url="string",
        url="string",
        username="string")
    
    const metricDrainResource = new aptible.MetricDrain("metricDrainResource", {
        drainType: "string",
        handle: "string",
        envId: 0,
        database: "string",
        databaseId: 0,
        apiKey: "string",
        bucket: "string",
        aptibleMetricDrainId: "string",
        organization: "string",
        password: "string",
        seriesUrl: "string",
        url: "string",
        username: "string",
    });
    
    type: aptible:MetricDrain
    properties:
        apiKey: string
        aptibleMetricDrainId: string
        bucket: string
        database: string
        databaseId: 0
        drainType: string
        envId: 0
        handle: string
        organization: string
        password: string
        seriesUrl: string
        url: string
        username: string
    

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

    DrainType string
    The type of metric drain: influxdb_database, influxdb, datadog
    EnvId double
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    Handle string
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    ApiKey string
    The API key for datadog or influxdb v2 drains to use for authentication.
    AptibleMetricDrainId string
    Bucket string
    The bucket for influxdb v2 drains to use.
    Database string
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    DatabaseId double
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    Organization string
    The InfluxDB organization for influxdb v2 drains to use.
    Password string
    The password for influxdb v1 drains to use for authentication.
    SeriesUrl string
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    Url string
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    Username string
    The user for influxdb v1 drains to use for authentication.
    DrainType string
    The type of metric drain: influxdb_database, influxdb, datadog
    EnvId float64
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    Handle string
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    ApiKey string
    The API key for datadog or influxdb v2 drains to use for authentication.
    AptibleMetricDrainId string
    Bucket string
    The bucket for influxdb v2 drains to use.
    Database string
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    DatabaseId float64
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    Organization string
    The InfluxDB organization for influxdb v2 drains to use.
    Password string
    The password for influxdb v1 drains to use for authentication.
    SeriesUrl string
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    Url string
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    Username string
    The user for influxdb v1 drains to use for authentication.
    drainType String
    The type of metric drain: influxdb_database, influxdb, datadog
    envId Double
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    handle String
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    apiKey String
    The API key for datadog or influxdb v2 drains to use for authentication.
    aptibleMetricDrainId String
    bucket String
    The bucket for influxdb v2 drains to use.
    database String
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    databaseId Double
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    organization String
    The InfluxDB organization for influxdb v2 drains to use.
    password String
    The password for influxdb v1 drains to use for authentication.
    seriesUrl String
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    url String
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    username String
    The user for influxdb v1 drains to use for authentication.
    drainType string
    The type of metric drain: influxdb_database, influxdb, datadog
    envId number
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    handle string
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    apiKey string
    The API key for datadog or influxdb v2 drains to use for authentication.
    aptibleMetricDrainId string
    bucket string
    The bucket for influxdb v2 drains to use.
    database string
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    databaseId number
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    organization string
    The InfluxDB organization for influxdb v2 drains to use.
    password string
    The password for influxdb v1 drains to use for authentication.
    seriesUrl string
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    url string
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    username string
    The user for influxdb v1 drains to use for authentication.
    drain_type str
    The type of metric drain: influxdb_database, influxdb, datadog
    env_id float
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    handle str
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    api_key str
    The API key for datadog or influxdb v2 drains to use for authentication.
    aptible_metric_drain_id str
    bucket str
    The bucket for influxdb v2 drains to use.
    database str
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    database_id float
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    organization str
    The InfluxDB organization for influxdb v2 drains to use.
    password str
    The password for influxdb v1 drains to use for authentication.
    series_url str
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    url str
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    username str
    The user for influxdb v1 drains to use for authentication.
    drainType String
    The type of metric drain: influxdb_database, influxdb, datadog
    envId Number
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    handle String
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    apiKey String
    The API key for datadog or influxdb v2 drains to use for authentication.
    aptibleMetricDrainId String
    bucket String
    The bucket for influxdb v2 drains to use.
    database String
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    databaseId Number
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    organization String
    The InfluxDB organization for influxdb v2 drains to use.
    password String
    The password for influxdb v1 drains to use for authentication.
    seriesUrl String
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    url String
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    username String
    The user for influxdb v1 drains to use for authentication.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    MetricDrainId double
    The unique ID for the metric drain.
    Id string
    The provider-assigned unique ID for this managed resource.
    MetricDrainId float64
    The unique ID for the metric drain.
    id String
    The provider-assigned unique ID for this managed resource.
    metricDrainId Double
    The unique ID for the metric drain.
    id string
    The provider-assigned unique ID for this managed resource.
    metricDrainId number
    The unique ID for the metric drain.
    id str
    The provider-assigned unique ID for this managed resource.
    metric_drain_id float
    The unique ID for the metric drain.
    id String
    The provider-assigned unique ID for this managed resource.
    metricDrainId Number
    The unique ID for the metric drain.

    Look up Existing MetricDrain Resource

    Get an existing MetricDrain 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?: MetricDrainState, opts?: CustomResourceOptions): MetricDrain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_key: Optional[str] = None,
            aptible_metric_drain_id: Optional[str] = None,
            bucket: Optional[str] = None,
            database: Optional[str] = None,
            database_id: Optional[float] = None,
            drain_type: Optional[str] = None,
            env_id: Optional[float] = None,
            handle: Optional[str] = None,
            metric_drain_id: Optional[float] = None,
            organization: Optional[str] = None,
            password: Optional[str] = None,
            series_url: Optional[str] = None,
            url: Optional[str] = None,
            username: Optional[str] = None) -> MetricDrain
    func GetMetricDrain(ctx *Context, name string, id IDInput, state *MetricDrainState, opts ...ResourceOption) (*MetricDrain, error)
    public static MetricDrain Get(string name, Input<string> id, MetricDrainState? state, CustomResourceOptions? opts = null)
    public static MetricDrain get(String name, Output<String> id, MetricDrainState state, CustomResourceOptions options)
    resources:  _:    type: aptible:MetricDrain    get:      id: ${id}
    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:
    ApiKey string
    The API key for datadog or influxdb v2 drains to use for authentication.
    AptibleMetricDrainId string
    Bucket string
    The bucket for influxdb v2 drains to use.
    Database string
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    DatabaseId double
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    DrainType string
    The type of metric drain: influxdb_database, influxdb, datadog
    EnvId double
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    Handle string
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    MetricDrainId double
    The unique ID for the metric drain.
    Organization string
    The InfluxDB organization for influxdb v2 drains to use.
    Password string
    The password for influxdb v1 drains to use for authentication.
    SeriesUrl string
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    Url string
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    Username string
    The user for influxdb v1 drains to use for authentication.
    ApiKey string
    The API key for datadog or influxdb v2 drains to use for authentication.
    AptibleMetricDrainId string
    Bucket string
    The bucket for influxdb v2 drains to use.
    Database string
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    DatabaseId float64
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    DrainType string
    The type of metric drain: influxdb_database, influxdb, datadog
    EnvId float64
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    Handle string
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    MetricDrainId float64
    The unique ID for the metric drain.
    Organization string
    The InfluxDB organization for influxdb v2 drains to use.
    Password string
    The password for influxdb v1 drains to use for authentication.
    SeriesUrl string
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    Url string
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    Username string
    The user for influxdb v1 drains to use for authentication.
    apiKey String
    The API key for datadog or influxdb v2 drains to use for authentication.
    aptibleMetricDrainId String
    bucket String
    The bucket for influxdb v2 drains to use.
    database String
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    databaseId Double
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    drainType String
    The type of metric drain: influxdb_database, influxdb, datadog
    envId Double
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    handle String
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    metricDrainId Double
    The unique ID for the metric drain.
    organization String
    The InfluxDB organization for influxdb v2 drains to use.
    password String
    The password for influxdb v1 drains to use for authentication.
    seriesUrl String
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    url String
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    username String
    The user for influxdb v1 drains to use for authentication.
    apiKey string
    The API key for datadog or influxdb v2 drains to use for authentication.
    aptibleMetricDrainId string
    bucket string
    The bucket for influxdb v2 drains to use.
    database string
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    databaseId number
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    drainType string
    The type of metric drain: influxdb_database, influxdb, datadog
    envId number
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    handle string
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    metricDrainId number
    The unique ID for the metric drain.
    organization string
    The InfluxDB organization for influxdb v2 drains to use.
    password string
    The password for influxdb v1 drains to use for authentication.
    seriesUrl string
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    url string
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    username string
    The user for influxdb v1 drains to use for authentication.
    api_key str
    The API key for datadog or influxdb v2 drains to use for authentication.
    aptible_metric_drain_id str
    bucket str
    The bucket for influxdb v2 drains to use.
    database str
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    database_id float
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    drain_type str
    The type of metric drain: influxdb_database, influxdb, datadog
    env_id float
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    handle str
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    metric_drain_id float
    The unique ID for the metric drain.
    organization str
    The InfluxDB organization for influxdb v2 drains to use.
    password str
    The password for influxdb v1 drains to use for authentication.
    series_url str
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    url str
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    username str
    The user for influxdb v1 drains to use for authentication.
    apiKey String
    The API key for datadog or influxdb v2 drains to use for authentication.
    aptibleMetricDrainId String
    bucket String
    The bucket for influxdb v2 drains to use.
    database String
    The InfluxDB v1 database for influxdb drains to send the metrics to.
    databaseId Number
    The ID of the Aptible InfluxDB database for influxdb_database drains to send metrics to.
    drainType String
    The type of metric drain: influxdb_database, influxdb, datadog
    envId Number
    The ID of the environment you would like to create the metric drain in. See main provider documentation for more on how to determine what you should use for env_id.
    handle String
    The handle for the metric drain. This must be all lower case, and only contain letters, numbers, -, _, or ..
    metricDrainId Number
    The unique ID for the metric drain.
    organization String
    The InfluxDB organization for influxdb v2 drains to use.
    password String
    The password for influxdb v1 drains to use for authentication.
    seriesUrl String
    The series API URL for datadog drains to send metrics to. Examples: https://app.datadoghq.com/api/v1/series, https://us3.datadoghq.com/api/v1/series, https://app.datadoghq.eu/api/v1/series, https://app.ddog-gov.com/api/v1/series
    url String
    The URL (scheme, host, and port) for influxdb drains to send metrics to.
    username String
    The user for influxdb v1 drains to use for authentication.

    Import

    Existing metric drains can be imported using the metric drain ID. For example:

    bash

    $ pulumi import aptible:index/metricDrain:MetricDrain example <ID>
    

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

    Package Details

    Repository
    aptible aptible/terraform-provider-aptible
    License
    Notes
    This Pulumi package is based on the aptible Terraform Provider.
    aptible logo
    aptible 0.9.12 published on Monday, Apr 14, 2025 by aptible