AWS Classic

v5.21.1 published on Thursday, Nov 17, 2022 by Pulumi

getEnvironments

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

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.AppConfig.GetEnvironments.Invoke(new()
    {
        ApplicationId = "a1d3rpe",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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
	})
}
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());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.appconfig.get_environments(application_id="a1d3rpe")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.appconfig.getEnvironments({
    applicationId: "a1d3rpe",
}));
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
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.