1. Packages
  2. Selectel Provider
  3. API Docs
  4. getDbaasPrometheusMetricTokenV1
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

selectel.getDbaasPrometheusMetricTokenV1

Explore with Pulumi AI

selectel logo
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

    Provides a list of tokens for Prometheus available in Managed Databases. For more information about tokens for Prometheus, see the official Selectel documentation for PostgreSQL, PostgreSQL for 1C, PostgreSQL TimescaleDB, MySQL semi-sync, MySQL sync, Redis, and Kafka.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const token1 = selectel.getDbaasPrometheusMetricTokenV1({
        projectId: selectel_vpc_project_v2.project_1.id,
        region: "ru-3",
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    token1 = selectel.get_dbaas_prometheus_metric_token_v1(project_id=selectel_vpc_project_v2["project_1"]["id"],
        region="ru-3")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v6/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.LookupDbaasPrometheusMetricTokenV1(ctx, &selectel.LookupDbaasPrometheusMetricTokenV1Args{
    			ProjectId: selectel_vpc_project_v2.Project_1.Id,
    			Region:    "ru-3",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Selectel = Pulumi.Selectel;
    
    return await Deployment.RunAsync(() => 
    {
        var token1 = Selectel.GetDbaasPrometheusMetricTokenV1.Invoke(new()
        {
            ProjectId = selectel_vpc_project_v2.Project_1.Id,
            Region = "ru-3",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.SelectelFunctions;
    import com.pulumi.selectel.inputs.GetDbaasPrometheusMetricTokenV1Args;
    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 token1 = SelectelFunctions.getDbaasPrometheusMetricTokenV1(GetDbaasPrometheusMetricTokenV1Args.builder()
                .projectId(selectel_vpc_project_v2.project_1().id())
                .region("ru-3")
                .build());
    
        }
    }
    
    variables:
      token1:
        fn::invoke:
          function: selectel:getDbaasPrometheusMetricTokenV1
          arguments:
            projectId: ${selectel_vpc_project_v2.project_1.id}
            region: ru-3
    

    Using getDbaasPrometheusMetricTokenV1

    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 getDbaasPrometheusMetricTokenV1(args: GetDbaasPrometheusMetricTokenV1Args, opts?: InvokeOptions): Promise<GetDbaasPrometheusMetricTokenV1Result>
    function getDbaasPrometheusMetricTokenV1Output(args: GetDbaasPrometheusMetricTokenV1OutputArgs, opts?: InvokeOptions): Output<GetDbaasPrometheusMetricTokenV1Result>
    def get_dbaas_prometheus_metric_token_v1(id: Optional[str] = None,
                                             project_id: Optional[str] = None,
                                             region: Optional[str] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetDbaasPrometheusMetricTokenV1Result
    def get_dbaas_prometheus_metric_token_v1_output(id: Optional[pulumi.Input[str]] = None,
                                             project_id: Optional[pulumi.Input[str]] = None,
                                             region: Optional[pulumi.Input[str]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetDbaasPrometheusMetricTokenV1Result]
    func LookupDbaasPrometheusMetricTokenV1(ctx *Context, args *LookupDbaasPrometheusMetricTokenV1Args, opts ...InvokeOption) (*LookupDbaasPrometheusMetricTokenV1Result, error)
    func LookupDbaasPrometheusMetricTokenV1Output(ctx *Context, args *LookupDbaasPrometheusMetricTokenV1OutputArgs, opts ...InvokeOption) LookupDbaasPrometheusMetricTokenV1ResultOutput

    > Note: This function is named LookupDbaasPrometheusMetricTokenV1 in the Go SDK.

    public static class GetDbaasPrometheusMetricTokenV1 
    {
        public static Task<GetDbaasPrometheusMetricTokenV1Result> InvokeAsync(GetDbaasPrometheusMetricTokenV1Args args, InvokeOptions? opts = null)
        public static Output<GetDbaasPrometheusMetricTokenV1Result> Invoke(GetDbaasPrometheusMetricTokenV1InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDbaasPrometheusMetricTokenV1Result> getDbaasPrometheusMetricTokenV1(GetDbaasPrometheusMetricTokenV1Args args, InvokeOptions options)
    public static Output<GetDbaasPrometheusMetricTokenV1Result> getDbaasPrometheusMetricTokenV1(GetDbaasPrometheusMetricTokenV1Args args, InvokeOptions options)
    
    fn::invoke:
      function: selectel:index/getDbaasPrometheusMetricTokenV1:getDbaasPrometheusMetricTokenV1
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Region string
    Pool where the database is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    Id string
    Unique identifier of the token.
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Region string
    Pool where the database is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    Id string
    Unique identifier of the token.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region String
    Pool where the database is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    id String
    Unique identifier of the token.
    projectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region string
    Pool where the database is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    id string
    Unique identifier of the token.
    project_id str
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region str
    Pool where the database is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    id str
    Unique identifier of the token.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region String
    Pool where the database is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    id String
    Unique identifier of the token.

    getDbaasPrometheusMetricTokenV1 Result

    The following output properties are available:

    Id string
    Unique identifier of the token.
    ProjectId string
    Unique identifier of the associated project. Learn more about Projects.
    PrometheusMetricsTokens List<GetDbaasPrometheusMetricTokenV1PrometheusMetricsToken>
    List of tokens for Prometheus.
    Region string
    Id string
    Unique identifier of the token.
    ProjectId string
    Unique identifier of the associated project. Learn more about Projects.
    PrometheusMetricsTokens []GetDbaasPrometheusMetricTokenV1PrometheusMetricsToken
    List of tokens for Prometheus.
    Region string
    id String
    Unique identifier of the token.
    projectId String
    Unique identifier of the associated project. Learn more about Projects.
    prometheusMetricsTokens List<GetDbaasPrometheusMetricTokenV1PrometheusMetricsToken>
    List of tokens for Prometheus.
    region String
    id string
    Unique identifier of the token.
    projectId string
    Unique identifier of the associated project. Learn more about Projects.
    prometheusMetricsTokens GetDbaasPrometheusMetricTokenV1PrometheusMetricsToken[]
    List of tokens for Prometheus.
    region string
    id str
    Unique identifier of the token.
    project_id str
    Unique identifier of the associated project. Learn more about Projects.
    prometheus_metrics_tokens Sequence[GetDbaasPrometheusMetricTokenV1PrometheusMetricsToken]
    List of tokens for Prometheus.
    region str
    id String
    Unique identifier of the token.
    projectId String
    Unique identifier of the associated project. Learn more about Projects.
    prometheusMetricsTokens List<Property Map>
    List of tokens for Prometheus.
    region String

    Supporting Types

    GetDbaasPrometheusMetricTokenV1PrometheusMetricsToken

    CreatedAt string
    Time when the token was created.
    Id string
    Unique identifier of the token.
    Name string
    Token name.
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    UpdatedAt string
    Time when the token was updated.
    Value string
    Token value.
    CreatedAt string
    Time when the token was created.
    Id string
    Unique identifier of the token.
    Name string
    Token name.
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    UpdatedAt string
    Time when the token was updated.
    Value string
    Token value.
    createdAt String
    Time when the token was created.
    id String
    Unique identifier of the token.
    name String
    Token name.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    updatedAt String
    Time when the token was updated.
    value String
    Token value.
    createdAt string
    Time when the token was created.
    id string
    Unique identifier of the token.
    name string
    Token name.
    projectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    updatedAt string
    Time when the token was updated.
    value string
    Token value.
    created_at str
    Time when the token was created.
    id str
    Unique identifier of the token.
    name str
    Token name.
    project_id str
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    updated_at str
    Time when the token was updated.
    value str
    Token value.
    createdAt String
    Time when the token was created.
    id String
    Unique identifier of the token.
    name String
    Token name.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    updatedAt String
    Time when the token was updated.
    value String
    Token value.

    Package Details

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