1. Packages
  2. Vcd Provider
  3. API Docs
  4. getOrgGroup
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getOrgGroup

Explore with Pulumi AI

Provides a data source for VMware Cloud Director Organization Groups. This can be used to fetch organization groups already defined in SAML, OAUTH or LDAP.

Supported in provider v3.6+

Example Usage

To Fetch An Organization Group

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

const org1 = vcd.getOrgGroup({
    org: "org1",
    name: "Org1-AdminGroup",
});
export const groupRole = org1.then(org1 => org1.role);
Copy
import pulumi
import pulumi_vcd as vcd

org1 = vcd.get_org_group(org="org1",
    name="Org1-AdminGroup")
pulumi.export("groupRole", org1.role)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		org1, err := vcd.LookupOrgGroup(ctx, &vcd.LookupOrgGroupArgs{
			Org:  pulumi.StringRef("org1"),
			Name: "Org1-AdminGroup",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("groupRole", org1.Role)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;

return await Deployment.RunAsync(() => 
{
    var org1 = Vcd.GetOrgGroup.Invoke(new()
    {
        Org = "org1",
        Name = "Org1-AdminGroup",
    });

    return new Dictionary<string, object?>
    {
        ["groupRole"] = org1.Apply(getOrgGroupResult => getOrgGroupResult.Role),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetOrgGroupArgs;
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 org1 = VcdFunctions.getOrgGroup(GetOrgGroupArgs.builder()
            .org("org1")
            .name("Org1-AdminGroup")
            .build());

        ctx.export("groupRole", org1.applyValue(getOrgGroupResult -> getOrgGroupResult.role()));
    }
}
Copy
variables:
  org1:
    fn::invoke:
      function: vcd:getOrgGroup
      arguments:
        org: org1
        name: Org1-AdminGroup
outputs:
  groupRole: ${org1.role}
Copy

Using getOrgGroup

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 getOrgGroup(args: GetOrgGroupArgs, opts?: InvokeOptions): Promise<GetOrgGroupResult>
function getOrgGroupOutput(args: GetOrgGroupOutputArgs, opts?: InvokeOptions): Output<GetOrgGroupResult>
Copy
def get_org_group(id: Optional[str] = None,
                  name: Optional[str] = None,
                  org: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetOrgGroupResult
def get_org_group_output(id: Optional[pulumi.Input[str]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  org: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetOrgGroupResult]
Copy
func LookupOrgGroup(ctx *Context, args *LookupOrgGroupArgs, opts ...InvokeOption) (*LookupOrgGroupResult, error)
func LookupOrgGroupOutput(ctx *Context, args *LookupOrgGroupOutputArgs, opts ...InvokeOption) LookupOrgGroupResultOutput
Copy

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

public static class GetOrgGroup 
{
    public static Task<GetOrgGroupResult> InvokeAsync(GetOrgGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetOrgGroupResult> Invoke(GetOrgGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOrgGroupResult> getOrgGroup(GetOrgGroupArgs args, InvokeOptions options)
public static Output<GetOrgGroupResult> getOrgGroup(GetOrgGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vcd:index/getOrgGroup:getOrgGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
A unique name for the group.
Id string
Org string
The name of organization to which the VDC belongs. Optional if defined at provider level.
Name This property is required. string
A unique name for the group.
Id string
Org string
The name of organization to which the VDC belongs. Optional if defined at provider level.
name This property is required. String
A unique name for the group.
id String
org String
The name of organization to which the VDC belongs. Optional if defined at provider level.
name This property is required. string
A unique name for the group.
id string
org string
The name of organization to which the VDC belongs. Optional if defined at provider level.
name This property is required. str
A unique name for the group.
id str
org str
The name of organization to which the VDC belongs. Optional if defined at provider level.
name This property is required. String
A unique name for the group.
id String
org String
The name of organization to which the VDC belongs. Optional if defined at provider level.

getOrgGroup Result

The following output properties are available:

Description string
Id string
Name string
ProviderType string
Role string
UserNames List<string>
Org string
Description string
Id string
Name string
ProviderType string
Role string
UserNames []string
Org string
description String
id String
name String
providerType String
role String
userNames List<String>
org String
description string
id string
name string
providerType string
role string
userNames string[]
org string
description str
id str
name str
provider_type str
role str
user_names Sequence[str]
org str
description String
id String
name String
providerType String
role String
userNames List<String>
org String

Package Details

Repository
vcd vmware/terraform-provider-vcd
License
Notes
This Pulumi package is based on the vcd Terraform Provider.