1. Packages
  2. GitHub
  3. API Docs
  4. getRepositoryEnvironments
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

github.getRepositoryEnvironments

Explore with Pulumi AI

github logo
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

    Use this data source to retrieve information about environments for a repository.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getRepositoryEnvironments({
        repository: "example-repository",
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_repository_environments(repository="example-repository")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := github.GetRepositoryEnvironments(ctx, &github.GetRepositoryEnvironmentsArgs{
    			Repository: "example-repository",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Github.GetRepositoryEnvironments.Invoke(new()
        {
            Repository = "example-repository",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.GithubFunctions;
    import com.pulumi.github.inputs.GetRepositoryEnvironmentsArgs;
    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 = GithubFunctions.getRepositoryEnvironments(GetRepositoryEnvironmentsArgs.builder()
                .repository("example-repository")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: github:getRepositoryEnvironments
          Arguments:
            repository: example-repository
    

    Using getRepositoryEnvironments

    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 getRepositoryEnvironments(args: GetRepositoryEnvironmentsArgs, opts?: InvokeOptions): Promise<GetRepositoryEnvironmentsResult>
    function getRepositoryEnvironmentsOutput(args: GetRepositoryEnvironmentsOutputArgs, opts?: InvokeOptions): Output<GetRepositoryEnvironmentsResult>
    def get_repository_environments(repository: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetRepositoryEnvironmentsResult
    def get_repository_environments_output(repository: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryEnvironmentsResult]
    func GetRepositoryEnvironments(ctx *Context, args *GetRepositoryEnvironmentsArgs, opts ...InvokeOption) (*GetRepositoryEnvironmentsResult, error)
    func GetRepositoryEnvironmentsOutput(ctx *Context, args *GetRepositoryEnvironmentsOutputArgs, opts ...InvokeOption) GetRepositoryEnvironmentsResultOutput

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

    public static class GetRepositoryEnvironments 
    {
        public static Task<GetRepositoryEnvironmentsResult> InvokeAsync(GetRepositoryEnvironmentsArgs args, InvokeOptions? opts = null)
        public static Output<GetRepositoryEnvironmentsResult> Invoke(GetRepositoryEnvironmentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRepositoryEnvironmentsResult> getRepositoryEnvironments(GetRepositoryEnvironmentsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: github:index/getRepositoryEnvironments:getRepositoryEnvironments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Repository string
    Name of the repository to retrieve the environments from.
    Repository string
    Name of the repository to retrieve the environments from.
    repository String
    Name of the repository to retrieve the environments from.
    repository string
    Name of the repository to retrieve the environments from.
    repository str
    Name of the repository to retrieve the environments from.
    repository String
    Name of the repository to retrieve the environments from.

    getRepositoryEnvironments Result

    The following output properties are available:

    Environments List<GetRepositoryEnvironmentsEnvironment>
    The list of this repository's environments. Each element of environments has the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Repository string
    Environments []GetRepositoryEnvironmentsEnvironment
    The list of this repository's environments. Each element of environments has the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Repository string
    environments List<GetRepositoryEnvironmentsEnvironment>
    The list of this repository's environments. Each element of environments has the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    repository String
    environments GetRepositoryEnvironmentsEnvironment[]
    The list of this repository's environments. Each element of environments has the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    repository string
    environments Sequence[GetRepositoryEnvironmentsEnvironment]
    The list of this repository's environments. Each element of environments has the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    repository str
    environments List<Property Map>
    The list of this repository's environments. Each element of environments has the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    repository String

    Supporting Types

    GetRepositoryEnvironmentsEnvironment

    Name string
    Environment name.
    NodeId string
    Environment node id.
    Name string
    Environment name.
    NodeId string
    Environment node id.
    name String
    Environment name.
    nodeId String
    Environment node id.
    name string
    Environment name.
    nodeId string
    Environment node id.
    name str
    Environment name.
    node_id str
    Environment node id.
    name String
    Environment name.
    nodeId String
    Environment node id.

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi