1. Packages
  2. Honeycombio Provider
  3. API Docs
  4. getEnvironment
honeycombio 0.34.0 published on Tuesday, May 6, 2025 by honeycombio

honeycombio.getEnvironment

Explore with Pulumi AI

honeycombio logo
honeycombio 0.34.0 published on Tuesday, May 6, 2025 by honeycombio

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as honeycombio from "@pulumi/honeycombio";
    
    const prod = honeycombio.getEnvironment({
        id: "hcaen_01j1d7t02zf7wgw7q89z3t60vf",
    });
    
    import pulumi
    import pulumi_honeycombio as honeycombio
    
    prod = honeycombio.get_environment(id="hcaen_01j1d7t02zf7wgw7q89z3t60vf")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/honeycombio/honeycombio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := honeycombio.LookupEnvironment(ctx, &honeycombio.LookupEnvironmentArgs{
    			Id: pulumi.StringRef("hcaen_01j1d7t02zf7wgw7q89z3t60vf"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Honeycombio = Pulumi.Honeycombio;
    
    return await Deployment.RunAsync(() => 
    {
        var prod = Honeycombio.GetEnvironment.Invoke(new()
        {
            Id = "hcaen_01j1d7t02zf7wgw7q89z3t60vf",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.honeycombio.HoneycombioFunctions;
    import com.pulumi.honeycombio.inputs.GetEnvironmentArgs;
    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 prod = HoneycombioFunctions.getEnvironment(GetEnvironmentArgs.builder()
                .id("hcaen_01j1d7t02zf7wgw7q89z3t60vf")
                .build());
    
        }
    }
    
    variables:
      prod:
        fn::invoke:
          function: honeycombio:getEnvironment
          arguments:
            id: hcaen_01j1d7t02zf7wgw7q89z3t60vf
    

    Filter Example

    import * as pulumi from "@pulumi/pulumi";
    import * as honeycombio from "@pulumi/honeycombio";
    
    const classic = honeycombio.getEnvironment({
        detailFilters: [{
            name: "name",
            value: "Classic",
        }],
    });
    const prod = honeycombio.getEnvironment({
        detailFilters: [{
            name: "name",
            value: "prod",
        }],
    });
    
    import pulumi
    import pulumi_honeycombio as honeycombio
    
    classic = honeycombio.get_environment(detail_filters=[{
        "name": "name",
        "value": "Classic",
    }])
    prod = honeycombio.get_environment(detail_filters=[{
        "name": "name",
        "value": "prod",
    }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/honeycombio/honeycombio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := honeycombio.LookupEnvironment(ctx, &honeycombio.LookupEnvironmentArgs{
    			DetailFilters: []honeycombio.GetEnvironmentDetailFilter{
    				{
    					Name:  "name",
    					Value: pulumi.StringRef("Classic"),
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = honeycombio.LookupEnvironment(ctx, &honeycombio.LookupEnvironmentArgs{
    			DetailFilters: []honeycombio.GetEnvironmentDetailFilter{
    				{
    					Name:  "name",
    					Value: pulumi.StringRef("prod"),
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Honeycombio = Pulumi.Honeycombio;
    
    return await Deployment.RunAsync(() => 
    {
        var classic = Honeycombio.GetEnvironment.Invoke(new()
        {
            DetailFilters = new[]
            {
                new Honeycombio.Inputs.GetEnvironmentDetailFilterInputArgs
                {
                    Name = "name",
                    Value = "Classic",
                },
            },
        });
    
        var prod = Honeycombio.GetEnvironment.Invoke(new()
        {
            DetailFilters = new[]
            {
                new Honeycombio.Inputs.GetEnvironmentDetailFilterInputArgs
                {
                    Name = "name",
                    Value = "prod",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.honeycombio.HoneycombioFunctions;
    import com.pulumi.honeycombio.inputs.GetEnvironmentArgs;
    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 classic = HoneycombioFunctions.getEnvironment(GetEnvironmentArgs.builder()
                .detailFilters(GetEnvironmentDetailFilterArgs.builder()
                    .name("name")
                    .value("Classic")
                    .build())
                .build());
    
            final var prod = HoneycombioFunctions.getEnvironment(GetEnvironmentArgs.builder()
                .detailFilters(GetEnvironmentDetailFilterArgs.builder()
                    .name("name")
                    .value("prod")
                    .build())
                .build());
    
        }
    }
    
    variables:
      classic:
        fn::invoke:
          function: honeycombio:getEnvironment
          arguments:
            detailFilters:
              - name: name
                value: Classic
      prod:
        fn::invoke:
          function: honeycombio:getEnvironment
          arguments:
            detailFilters:
              - name: name
                value: prod
    

    Using getEnvironment

    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 getEnvironment(args: GetEnvironmentArgs, opts?: InvokeOptions): Promise<GetEnvironmentResult>
    function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentResult>
    def get_environment(detail_filters: Optional[Sequence[GetEnvironmentDetailFilter]] = None,
                        id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetEnvironmentResult
    def get_environment_output(detail_filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetEnvironmentDetailFilterArgs]]]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentResult]
    func LookupEnvironment(ctx *Context, args *LookupEnvironmentArgs, opts ...InvokeOption) (*LookupEnvironmentResult, error)
    func LookupEnvironmentOutput(ctx *Context, args *LookupEnvironmentOutputArgs, opts ...InvokeOption) LookupEnvironmentResultOutput

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

    public static class GetEnvironment 
    {
        public static Task<GetEnvironmentResult> InvokeAsync(GetEnvironmentArgs args, InvokeOptions? opts = null)
        public static Output<GetEnvironmentResult> Invoke(GetEnvironmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
    public static Output<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: honeycombio:index/getEnvironment:getEnvironment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DetailFilters List<GetEnvironmentDetailFilter>
    a block to further filter results as described below. name must be set when providing a filter.
    Id string
    The ID of the Environment. Conflicts with detail_filter.
    DetailFilters []GetEnvironmentDetailFilter
    a block to further filter results as described below. name must be set when providing a filter.
    Id string
    The ID of the Environment. Conflicts with detail_filter.
    detailFilters List<GetEnvironmentDetailFilter>
    a block to further filter results as described below. name must be set when providing a filter.
    id String
    The ID of the Environment. Conflicts with detail_filter.
    detailFilters GetEnvironmentDetailFilter[]
    a block to further filter results as described below. name must be set when providing a filter.
    id string
    The ID of the Environment. Conflicts with detail_filter.
    detail_filters Sequence[GetEnvironmentDetailFilter]
    a block to further filter results as described below. name must be set when providing a filter.
    id str
    The ID of the Environment. Conflicts with detail_filter.
    detailFilters List<Property Map>
    a block to further filter results as described below. name must be set when providing a filter.
    id String
    The ID of the Environment. Conflicts with detail_filter.

    getEnvironment Result

    The following output properties are available:

    Color string
    the Environment's color.
    DeleteProtected bool
    the current state of the Environment's deletion protection status.
    Description string
    the Environment's description.
    Id string
    Name string
    the Environment's name.
    Slug string
    the Environment's slug.
    DetailFilters List<GetEnvironmentDetailFilter>
    Color string
    the Environment's color.
    DeleteProtected bool
    the current state of the Environment's deletion protection status.
    Description string
    the Environment's description.
    Id string
    Name string
    the Environment's name.
    Slug string
    the Environment's slug.
    DetailFilters []GetEnvironmentDetailFilter
    color String
    the Environment's color.
    deleteProtected Boolean
    the current state of the Environment's deletion protection status.
    description String
    the Environment's description.
    id String
    name String
    the Environment's name.
    slug String
    the Environment's slug.
    detailFilters List<GetEnvironmentDetailFilter>
    color string
    the Environment's color.
    deleteProtected boolean
    the current state of the Environment's deletion protection status.
    description string
    the Environment's description.
    id string
    name string
    the Environment's name.
    slug string
    the Environment's slug.
    detailFilters GetEnvironmentDetailFilter[]
    color str
    the Environment's color.
    delete_protected bool
    the current state of the Environment's deletion protection status.
    description str
    the Environment's description.
    id str
    name str
    the Environment's name.
    slug str
    the Environment's slug.
    detail_filters Sequence[GetEnvironmentDetailFilter]
    color String
    the Environment's color.
    deleteProtected Boolean
    the current state of the Environment's deletion protection status.
    description String
    the Environment's description.
    id String
    name String
    the Environment's name.
    slug String
    the Environment's slug.
    detailFilters List<Property Map>

    Supporting Types

    GetEnvironmentDetailFilter

    Name string
    The name of the detail field to filter by. Currently only name is supported.
    Value string
    The value of the detail field to match on.
    ValueRegex string
    A regular expression string to apply to the value of the detail field to match on.
    Name string
    The name of the detail field to filter by. Currently only name is supported.
    Value string
    The value of the detail field to match on.
    ValueRegex string
    A regular expression string to apply to the value of the detail field to match on.
    name String
    The name of the detail field to filter by. Currently only name is supported.
    value String
    The value of the detail field to match on.
    valueRegex String
    A regular expression string to apply to the value of the detail field to match on.
    name string
    The name of the detail field to filter by. Currently only name is supported.
    value string
    The value of the detail field to match on.
    valueRegex string
    A regular expression string to apply to the value of the detail field to match on.
    name str
    The name of the detail field to filter by. Currently only name is supported.
    value str
    The value of the detail field to match on.
    value_regex str
    A regular expression string to apply to the value of the detail field to match on.
    name String
    The name of the detail field to filter by. Currently only name is supported.
    value String
    The value of the detail field to match on.
    valueRegex String
    A regular expression string to apply to the value of the detail field to match on.

    Package Details

    Repository
    honeycombio honeycombio/terraform-provider-honeycombio
    License
    Notes
    This Pulumi package is based on the honeycombio Terraform Provider.
    honeycombio logo
    honeycombio 0.34.0 published on Tuesday, May 6, 2025 by honeycombio