1. Packages
  2. AWS
  3. API Docs
  4. appconfig
  5. getEnvironments
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.appconfig.getEnvironments

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides access to all Environments for an AppConfig Application. This will allow you to pass Environment IDs to another resource.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.appconfig.getEnvironments({
        applicationId: "a1d3rpe",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.appconfig.get_environments(application_id="a1d3rpe")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appconfig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appconfig.GetEnvironments(ctx, &appconfig.GetEnvironmentsArgs{
    			ApplicationId: "a1d3rpe",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.AppConfig.GetEnvironments.Invoke(new()
        {
            ApplicationId = "a1d3rpe",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appconfig.AppconfigFunctions;
    import com.pulumi.aws.appconfig.inputs.GetEnvironmentsArgs;
    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 example = AppconfigFunctions.getEnvironments(GetEnvironmentsArgs.builder()
                .applicationId("a1d3rpe")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:appconfig:getEnvironments
          Arguments:
            applicationId: a1d3rpe
    

    Using getEnvironments

    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 getEnvironments(args: GetEnvironmentsArgs, opts?: InvokeOptions): Promise<GetEnvironmentsResult>
    function getEnvironmentsOutput(args: GetEnvironmentsOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentsResult>
    def get_environments(application_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetEnvironmentsResult
    def get_environments_output(application_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentsResult]
    func GetEnvironments(ctx *Context, args *GetEnvironmentsArgs, opts ...InvokeOption) (*GetEnvironmentsResult, error)
    func GetEnvironmentsOutput(ctx *Context, args *GetEnvironmentsOutputArgs, opts ...InvokeOption) GetEnvironmentsResultOutput

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

    public static class GetEnvironments 
    {
        public static Task<GetEnvironmentsResult> InvokeAsync(GetEnvironmentsArgs args, InvokeOptions? opts = null)
        public static Output<GetEnvironmentsResult> Invoke(GetEnvironmentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnvironmentsResult> getEnvironments(GetEnvironmentsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:appconfig/getEnvironments:getEnvironments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApplicationId string
    ID of the AppConfig Application.
    ApplicationId string
    ID of the AppConfig Application.
    applicationId String
    ID of the AppConfig Application.
    applicationId string
    ID of the AppConfig Application.
    application_id str
    ID of the AppConfig Application.
    applicationId String
    ID of the AppConfig Application.

    getEnvironments Result

    The following output properties are available:

    ApplicationId string
    EnvironmentIds List<string>
    Set of Environment IDs associated with this AppConfig Application.
    Id string
    The provider-assigned unique ID for this managed resource.
    ApplicationId string
    EnvironmentIds []string
    Set of Environment IDs associated with this AppConfig Application.
    Id string
    The provider-assigned unique ID for this managed resource.
    applicationId String
    environmentIds List<String>
    Set of Environment IDs associated with this AppConfig Application.
    id String
    The provider-assigned unique ID for this managed resource.
    applicationId string
    environmentIds string[]
    Set of Environment IDs associated with this AppConfig Application.
    id string
    The provider-assigned unique ID for this managed resource.
    application_id str
    environment_ids Sequence[str]
    Set of Environment IDs associated with this AppConfig Application.
    id str
    The provider-assigned unique ID for this managed resource.
    applicationId String
    environmentIds List<String>
    Set of Environment IDs associated with this AppConfig Application.
    id String
    The provider-assigned unique ID for this managed resource.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi