1. Packages
  2. CockroachDB Cloud
  3. API Docs
  4. MetricExportPrometheusConfig
CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse

cockroach.MetricExportPrometheusConfig

Explore with Pulumi AI

cockroach logo
CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse

    Prometheus metric export configuration for a cluster. This is only available for dedicated clusters with AWS and GCP cloud providers.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cockroach from "@pulumiverse/cockroach";
    
    const config = new pulumi.Config();
    const clusterId = config.require("clusterId");
    const example = new cockroach.MetricExportPrometheusConfig("example", {clusterId: clusterId});
    
    import pulumi
    import pulumiverse_cockroach as cockroach
    
    config = pulumi.Config()
    cluster_id = config.require("clusterId")
    example = cockroach.MetricExportPrometheusConfig("example", cluster_id=cluster_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    	"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		clusterId := cfg.Require("clusterId")
    		_, err := cockroach.NewMetricExportPrometheusConfig(ctx, "example", &cockroach.MetricExportPrometheusConfigArgs{
    			ClusterId: pulumi.String(clusterId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cockroach = Pulumiverse.Cockroach;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var clusterId = config.Require("clusterId");
        var example = new Cockroach.MetricExportPrometheusConfig("example", new()
        {
            ClusterId = clusterId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cockroach.MetricExportPrometheusConfig;
    import com.pulumi.cockroach.MetricExportPrometheusConfigArgs;
    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 config = ctx.config();
            final var clusterId = config.get("clusterId");
            var example = new MetricExportPrometheusConfig("example", MetricExportPrometheusConfigArgs.builder()
                .clusterId(clusterId)
                .build());
    
        }
    }
    
    configuration:
      clusterId:
        type: string
    resources:
      example:
        type: cockroach:MetricExportPrometheusConfig
        properties:
          clusterId: ${clusterId}
    

    Create MetricExportPrometheusConfig Resource

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

    Constructor syntax

    new MetricExportPrometheusConfig(name: string, args: MetricExportPrometheusConfigArgs, opts?: CustomResourceOptions);
    @overload
    def MetricExportPrometheusConfig(resource_name: str,
                                     args: MetricExportPrometheusConfigArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricExportPrometheusConfig(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     cluster_id: Optional[str] = None)
    func NewMetricExportPrometheusConfig(ctx *Context, name string, args MetricExportPrometheusConfigArgs, opts ...ResourceOption) (*MetricExportPrometheusConfig, error)
    public MetricExportPrometheusConfig(string name, MetricExportPrometheusConfigArgs args, CustomResourceOptions? opts = null)
    public MetricExportPrometheusConfig(String name, MetricExportPrometheusConfigArgs args)
    public MetricExportPrometheusConfig(String name, MetricExportPrometheusConfigArgs args, CustomResourceOptions options)
    
    type: cockroach:MetricExportPrometheusConfig
    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 MetricExportPrometheusConfigArgs
    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 MetricExportPrometheusConfigArgs
    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 MetricExportPrometheusConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricExportPrometheusConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricExportPrometheusConfigArgs
    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 metricExportPrometheusConfigResource = new Cockroach.MetricExportPrometheusConfig("metricExportPrometheusConfigResource", new()
    {
        ClusterId = "string",
    });
    
    example, err := cockroach.NewMetricExportPrometheusConfig(ctx, "metricExportPrometheusConfigResource", &cockroach.MetricExportPrometheusConfigArgs{
    	ClusterId: pulumi.String("string"),
    })
    
    var metricExportPrometheusConfigResource = new MetricExportPrometheusConfig("metricExportPrometheusConfigResource", MetricExportPrometheusConfigArgs.builder()
        .clusterId("string")
        .build());
    
    metric_export_prometheus_config_resource = cockroach.MetricExportPrometheusConfig("metricExportPrometheusConfigResource", cluster_id="string")
    
    const metricExportPrometheusConfigResource = new cockroach.MetricExportPrometheusConfig("metricExportPrometheusConfigResource", {clusterId: "string"});
    
    type: cockroach:MetricExportPrometheusConfig
    properties:
        clusterId: string
    

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

    ClusterId string
    Cluster ID.
    ClusterId string
    Cluster ID.
    clusterId String
    Cluster ID.
    clusterId string
    Cluster ID.
    cluster_id str
    Cluster ID.
    clusterId String
    Cluster ID.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    Targets Dictionary<string, string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    Targets map[string]string
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    targets Map<String,String>
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    targets {[key: string]: string}
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    targets Mapping[str, str]
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    targets Map<String>

    Look up Existing MetricExportPrometheusConfig Resource

    Get an existing MetricExportPrometheusConfig 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?: MetricExportPrometheusConfigState, opts?: CustomResourceOptions): MetricExportPrometheusConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            status: Optional[str] = None,
            targets: Optional[Mapping[str, str]] = None) -> MetricExportPrometheusConfig
    func GetMetricExportPrometheusConfig(ctx *Context, name string, id IDInput, state *MetricExportPrometheusConfigState, opts ...ResourceOption) (*MetricExportPrometheusConfig, error)
    public static MetricExportPrometheusConfig Get(string name, Input<string> id, MetricExportPrometheusConfigState? state, CustomResourceOptions? opts = null)
    public static MetricExportPrometheusConfig get(String name, Output<String> id, MetricExportPrometheusConfigState 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:
    ClusterId string
    Cluster ID.
    Status string
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    Targets Dictionary<string, string>
    ClusterId string
    Cluster ID.
    Status string
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    Targets map[string]string
    clusterId String
    Cluster ID.
    status String
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    targets Map<String,String>
    clusterId string
    Cluster ID.
    status string
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    targets {[key: string]: string}
    cluster_id str
    Cluster ID.
    status str
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    targets Mapping[str, str]
    clusterId String
    Cluster ID.
    status String
    The current state of the metric export configuration. Possible values are: [NOT_DEPLOYED DISABLING ENABLING ENABLED ERROR]
    targets Map<String>

    Package Details

    Repository
    cockroach pulumiverse/pulumi-cockroach
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cockroach Terraform Provider.
    cockroach logo
    CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse