1. Packages
  2. Cloudfoundry Provider
  3. API Docs
  4. getOrg
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

cloudfoundry.getOrg

Explore with Pulumi AI

cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

Gets information on a Cloud Foundry organization.

Example Usage

The following example looks up an organization named ‘myorg’.

import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";

const org = cloudfoundry.getOrg({
    name: "myorg",
});
Copy
import pulumi
import pulumi_cloudfoundry as cloudfoundry

org = cloudfoundry.get_org(name="myorg")
Copy
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 {
		_, err := cloudfoundry.LookupOrg(ctx, &cloudfoundry.LookupOrgArgs{
			Name: "myorg",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudfoundry = Pulumi.Cloudfoundry;

return await Deployment.RunAsync(() => 
{
    var org = Cloudfoundry.GetOrg.Invoke(new()
    {
        Name = "myorg",
    });

});
Copy
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.GetOrgArgs;
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 org = CloudfoundryFunctions.getOrg(GetOrgArgs.builder()
            .name("myorg")
            .build());

    }
}
Copy
variables:
  org:
    fn::invoke:
      function: cloudfoundry:getOrg
      arguments:
        name: myorg
Copy

Using getOrg

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 getOrg(args: GetOrgArgs, opts?: InvokeOptions): Promise<GetOrgResult>
function getOrgOutput(args: GetOrgOutputArgs, opts?: InvokeOptions): Output<GetOrgResult>
Copy
def get_org(annotations: Optional[Mapping[str, str]] = None,
            id: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetOrgResult
def get_org_output(annotations: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            id: Optional[pulumi.Input[str]] = None,
            labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            name: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetOrgResult]
Copy
func LookupOrg(ctx *Context, args *LookupOrgArgs, opts ...InvokeOption) (*LookupOrgResult, error)
func LookupOrgOutput(ctx *Context, args *LookupOrgOutputArgs, opts ...InvokeOption) LookupOrgResultOutput
Copy

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

public static class GetOrg 
{
    public static Task<GetOrgResult> InvokeAsync(GetOrgArgs args, InvokeOptions? opts = null)
    public static Output<GetOrgResult> Invoke(GetOrgInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOrgResult> getOrg(GetOrgArgs args, InvokeOptions options)
public static Output<GetOrgResult> getOrg(GetOrgArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudfoundry:index/getOrg:getOrg
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the organization to look up
Annotations Dictionary<string, string>
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
Id string
The GUID of the organization
Labels Dictionary<string, string>
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
Name This property is required. string
The name of the organization to look up
Annotations map[string]string
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
Id string
The GUID of the organization
Labels map[string]string
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
name This property is required. String
The name of the organization to look up
annotations Map<String,String>
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
id String
The GUID of the organization
labels Map<String,String>
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
name This property is required. string
The name of the organization to look up
annotations {[key: string]: string}
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
id string
The GUID of the organization
labels {[key: string]: string}
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
name This property is required. str
The name of the organization to look up
annotations Mapping[str, str]
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
id str
The GUID of the organization
labels Mapping[str, str]
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
name This property is required. String
The name of the organization to look up
annotations Map<String>
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
id String
The GUID of the organization
labels Map<String>
Map of labels as described here. Works only on cloud foundry with api >= v3.63.

getOrg Result

The following output properties are available:

Id string
The GUID of the organization
Name string
Annotations Dictionary<string, string>
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
Labels Dictionary<string, string>
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
Id string
The GUID of the organization
Name string
Annotations map[string]string
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
Labels map[string]string
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
id String
The GUID of the organization
name String
annotations Map<String,String>
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
labels Map<String,String>
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
id string
The GUID of the organization
name string
annotations {[key: string]: string}
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
labels {[key: string]: string}
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
id str
The GUID of the organization
name str
annotations Mapping[str, str]
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
labels Mapping[str, str]
Map of labels as described here. Works only on cloud foundry with api >= v3.63.
id String
The GUID of the organization
name String
annotations Map<String>
Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
labels Map<String>
Map of labels as described here. Works only on cloud foundry with api >= v3.63.

Package Details

Repository
cloudfoundry cloudfoundry-community/terraform-provider-cloudfoundry
License
Notes
This Pulumi package is based on the cloudfoundry Terraform Provider.
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community