1. Registry
  2. Packages
  3. Cloudfoundry Provider
  4. API Docs
  5. getOrgs
Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry
cloudfoundry
Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry

    Retrieve all organizations the user has access to.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    export = async () => {
        const orgs = await cloudfoundry.getOrgs({});
        return {
            orgs: orgs,
        };
    }
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    orgs = cloudfoundry.get_orgs()
    pulumi.export("orgs", orgs)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		orgs, err := cloudfoundry.GetOrgs(ctx, &cloudfoundry.GetOrgsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("orgs", orgs)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var orgs = Cloudfoundry.GetOrgs.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["orgs"] = orgs,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.CloudfoundryFunctions;
    import com.pulumi.cloudfoundry.inputs.GetOrgsArgs;
    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 orgs = CloudfoundryFunctions.getOrgs(GetOrgsArgs.builder()
                .build());
    
            ctx.export("orgs", orgs);
        }
    }
    
    variables:
      orgs:
        fn::invoke:
          function: cloudfoundry:getOrgs
          arguments: {}
    outputs:
      orgs: ${orgs}
    
    Example coming soon!
    

    Using getOrgs

    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 getOrgs(args: GetOrgsArgs, opts?: InvokeOptions): Promise<GetOrgsResult>
    function getOrgsOutput(args: GetOrgsOutputArgs, opts?: InvokeOutputOptions): Output<GetOrgsResult>
    def get_orgs(name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetOrgsResult
    def get_orgs_output(name: pulumi.Input[Optional[str]] = None,
                 opts: Optional[InvokeOutputOptions] = None) -> Output[GetOrgsResult]
    func GetOrgs(ctx *Context, args *GetOrgsArgs, opts ...InvokeOption) (*GetOrgsResult, error)
    func GetOrgsOutput(ctx *Context, args *GetOrgsOutputArgs, opts ...InvokeOption) GetOrgsResultOutput

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

    public static class GetOrgs 
    {
        public static Task<GetOrgsResult> InvokeAsync(GetOrgsArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgsResult> Invoke(GetOrgsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgsResult> Invoke(GetOrgsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetOrgsResult> getOrgs(GetOrgsArgs args, InvokeOptions options)
    public static Output<GetOrgsResult> getOrgs(GetOrgsArgs args, InvokeOptions options)
    public static Output<GetOrgsResult> getOrgs(GetOrgsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: cloudfoundry:index/getOrgs:getOrgs
      arguments:
        # arguments dictionary
    data "cloudfoundry_get_orgs" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The name of the organization to look up
    Name string
    The name of the organization to look up
    name string
    The name of the organization to look up
    name String
    The name of the organization to look up
    name string
    The name of the organization to look up
    name str
    The name of the organization to look up
    name String
    The name of the organization to look up

    getOrgs Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Orgs List<GetOrgsOrg>
    The organizations available
    Name string
    The name of the organization to look up
    Id string
    The provider-assigned unique ID for this managed resource.
    Orgs []GetOrgsOrg
    The organizations available
    Name string
    The name of the organization to look up
    id string
    The provider-assigned unique ID for this managed resource.
    orgs list(object)
    The organizations available
    name string
    The name of the organization to look up
    id String
    The provider-assigned unique ID for this managed resource.
    orgs List<GetOrgsOrg>
    The organizations available
    name String
    The name of the organization to look up
    id string
    The provider-assigned unique ID for this managed resource.
    orgs GetOrgsOrg[]
    The organizations available
    name string
    The name of the organization to look up
    id str
    The provider-assigned unique ID for this managed resource.
    orgs Sequence[GetOrgsOrg]
    The organizations available
    name str
    The name of the organization to look up
    id String
    The provider-assigned unique ID for this managed resource.
    orgs List<Property Map>
    The organizations available
    name String
    The name of the organization to look up

    Supporting Types

    GetOrgsOrg

    Annotations Dictionary<string, string>
    The annotations associated with Cloud Foundry resources.
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Id string
    The GUID of the object.
    Labels Dictionary<string, string>
    The labels associated with Cloud Foundry resources.
    Name string
    name of the organization
    Quota string
    The ID of quota to be applied to this Org. Default quota is assigned to the org by default.
    Suspended bool
    Whether an organization is suspended or not
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    Annotations map[string]string
    The annotations associated with Cloud Foundry resources.
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Id string
    The GUID of the object.
    Labels map[string]string
    The labels associated with Cloud Foundry resources.
    Name string
    name of the organization
    Quota string
    The ID of quota to be applied to this Org. Default quota is assigned to the org by default.
    Suspended bool
    Whether an organization is suspended or not
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    annotations map(string)
    The annotations associated with Cloud Foundry resources.
    created_at string
    The date and time when the resource was created in RFC3339 format.
    id string
    The GUID of the object.
    labels map(string)
    The labels associated with Cloud Foundry resources.
    name string
    name of the organization
    quota string
    The ID of quota to be applied to this Org. Default quota is assigned to the org by default.
    suspended bool
    Whether an organization is suspended or not
    updated_at string
    The date and time when the resource was updated in RFC3339 format.
    annotations Map<String,String>
    The annotations associated with Cloud Foundry resources.
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    id String
    The GUID of the object.
    labels Map<String,String>
    The labels associated with Cloud Foundry resources.
    name String
    name of the organization
    quota String
    The ID of quota to be applied to this Org. Default quota is assigned to the org by default.
    suspended Boolean
    Whether an organization is suspended or not
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    annotations {[key: string]: string}
    The annotations associated with Cloud Foundry resources.
    createdAt string
    The date and time when the resource was created in RFC3339 format.
    id string
    The GUID of the object.
    labels {[key: string]: string}
    The labels associated with Cloud Foundry resources.
    name string
    name of the organization
    quota string
    The ID of quota to be applied to this Org. Default quota is assigned to the org by default.
    suspended boolean
    Whether an organization is suspended or not
    updatedAt string
    The date and time when the resource was updated in RFC3339 format.
    annotations Mapping[str, str]
    The annotations associated with Cloud Foundry resources.
    created_at str
    The date and time when the resource was created in RFC3339 format.
    id str
    The GUID of the object.
    labels Mapping[str, str]
    The labels associated with Cloud Foundry resources.
    name str
    name of the organization
    quota str
    The ID of quota to be applied to this Org. Default quota is assigned to the org by default.
    suspended bool
    Whether an organization is suspended or not
    updated_at str
    The date and time when the resource was updated in RFC3339 format.
    annotations Map<String>
    The annotations associated with Cloud Foundry resources.
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    id String
    The GUID of the object.
    labels Map<String>
    The labels associated with Cloud Foundry resources.
    name String
    name of the organization
    quota String
    The ID of quota to be applied to this Org. Default quota is assigned to the org by default.
    suspended Boolean
    Whether an organization is suspended or not
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.

    Package Details

    Repository
    cloudfoundry cloudfoundry/terraform-provider-cloudfoundry
    License
    Notes
    This Pulumi package is based on the cloudfoundry Terraform Provider.
    cloudfoundry
    Viewing docs for cloudfoundry 1.19.0
    published on Friday, Nov 13, 2026 by cloudfoundry

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial