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

vcd.getOrgUser

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Provides a VMware Cloud Director Org User data source. This can be used to read organization users, including org administrators.

    Supported in provider v3.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const my_org_admin = vcd.getOrgUser({
        org: "my-org",
        name: "my-org-admin",
    });
    const my_vapp_creator = vcd.getOrgUser({
        org: "my-org",
        userId: "urn:vcloud:user:c311eb35-6984-4d26-3ee9-0000deadbeef",
    });
    export const adminUser = my_org_admin;
    export const vappCreatorUser = my_vapp_creator;
    
    import pulumi
    import pulumi_vcd as vcd
    
    my_org_admin = vcd.get_org_user(org="my-org",
        name="my-org-admin")
    my_vapp_creator = vcd.get_org_user(org="my-org",
        user_id="urn:vcloud:user:c311eb35-6984-4d26-3ee9-0000deadbeef")
    pulumi.export("adminUser", my_org_admin)
    pulumi.export("vappCreatorUser", my_vapp_creator)
    
    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 {
    		my_org_admin, err := vcd.LookupOrgUser(ctx, &vcd.LookupOrgUserArgs{
    			Org:  pulumi.StringRef("my-org"),
    			Name: pulumi.StringRef("my-org-admin"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		my_vapp_creator, err := vcd.LookupOrgUser(ctx, &vcd.LookupOrgUserArgs{
    			Org:    pulumi.StringRef("my-org"),
    			UserId: pulumi.StringRef("urn:vcloud:user:c311eb35-6984-4d26-3ee9-0000deadbeef"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("adminUser", my_org_admin)
    		ctx.Export("vappCreatorUser", my_vapp_creator)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vcd = Pulumi.Vcd;
    
    return await Deployment.RunAsync(() => 
    {
        var my_org_admin = Vcd.GetOrgUser.Invoke(new()
        {
            Org = "my-org",
            Name = "my-org-admin",
        });
    
        var my_vapp_creator = Vcd.GetOrgUser.Invoke(new()
        {
            Org = "my-org",
            UserId = "urn:vcloud:user:c311eb35-6984-4d26-3ee9-0000deadbeef",
        });
    
        return new Dictionary<string, object?>
        {
            ["adminUser"] = my_org_admin,
            ["vappCreatorUser"] = my_vapp_creator,
        };
    });
    
    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.GetOrgUserArgs;
    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 my-org-admin = VcdFunctions.getOrgUser(GetOrgUserArgs.builder()
                .org("my-org")
                .name("my-org-admin")
                .build());
    
            final var my-vapp-creator = VcdFunctions.getOrgUser(GetOrgUserArgs.builder()
                .org("my-org")
                .userId("urn:vcloud:user:c311eb35-6984-4d26-3ee9-0000deadbeef")
                .build());
    
            ctx.export("adminUser", my_org_admin);
            ctx.export("vappCreatorUser", my_vapp_creator);
        }
    }
    
    variables:
      my-org-admin:
        fn::invoke:
          function: vcd:getOrgUser
          arguments:
            org: my-org
            name: my-org-admin
      my-vapp-creator:
        fn::invoke:
          function: vcd:getOrgUser
          arguments:
            org: my-org
            userId: urn:vcloud:user:c311eb35-6984-4d26-3ee9-0000deadbeef
    outputs:
      adminUser: ${["my-org-admin"]}
      vappCreatorUser: ${["my-vapp-creator"]}
    

    Using getOrgUser

    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 getOrgUser(args: GetOrgUserArgs, opts?: InvokeOptions): Promise<GetOrgUserResult>
    function getOrgUserOutput(args: GetOrgUserOutputArgs, opts?: InvokeOptions): Output<GetOrgUserResult>
    def get_org_user(id: Optional[str] = None,
                     name: Optional[str] = None,
                     org: Optional[str] = None,
                     user_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetOrgUserResult
    def get_org_user_output(id: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     org: Optional[pulumi.Input[str]] = None,
                     user_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetOrgUserResult]
    func LookupOrgUser(ctx *Context, args *LookupOrgUserArgs, opts ...InvokeOption) (*LookupOrgUserResult, error)
    func LookupOrgUserOutput(ctx *Context, args *LookupOrgUserOutputArgs, opts ...InvokeOption) LookupOrgUserResultOutput

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

    public static class GetOrgUser 
    {
        public static Task<GetOrgUserResult> InvokeAsync(GetOrgUserArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgUserResult> Invoke(GetOrgUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrgUserResult> getOrgUser(GetOrgUserArgs args, InvokeOptions options)
    public static Output<GetOrgUserResult> getOrgUser(GetOrgUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getOrgUser:getOrgUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of the Organization user
    Name string
    The name of the user. Required if user_id is not set.
    Org string
    The name of organization to which the user belongs. Optional if defined at provider level.
    UserId string
    The ID of the user. Required if name is not set.
    Id string
    The ID of the Organization user
    Name string
    The name of the user. Required if user_id is not set.
    Org string
    The name of organization to which the user belongs. Optional if defined at provider level.
    UserId string
    The ID of the user. Required if name is not set.
    id String
    The ID of the Organization user
    name String
    The name of the user. Required if user_id is not set.
    org String
    The name of organization to which the user belongs. Optional if defined at provider level.
    userId String
    The ID of the user. Required if name is not set.
    id string
    The ID of the Organization user
    name string
    The name of the user. Required if user_id is not set.
    org string
    The name of organization to which the user belongs. Optional if defined at provider level.
    userId string
    The ID of the user. Required if name is not set.
    id str
    The ID of the Organization user
    name str
    The name of the user. Required if user_id is not set.
    org str
    The name of organization to which the user belongs. Optional if defined at provider level.
    user_id str
    The ID of the user. Required if name is not set.
    id String
    The ID of the Organization user
    name String
    The name of the user. Required if user_id is not set.
    org String
    The name of organization to which the user belongs. Optional if defined at provider level.
    userId String
    The ID of the user. Required if name is not set.

    getOrgUser Result

    The following output properties are available:

    DeployedVmQuota double
    Quota of vApps that this user can deploy. A value of 0 specifies an unlimited quota.
    Description string
    An optional description of the user.
    EmailAddress string
    The Org User email address.
    Enabled bool
    True if the user is enabled and can log in.
    FullName string
    The full name of the user.
    GroupNames List<string>
    The set of group names to which this user belongs. It's only populated if the users are created after the group (with this user having a depends_on of the given group).
    Id string
    The ID of the Organization user
    InstantMessaging string
    The Org User instant messaging.
    IsExternal bool
    If the user account was imported from an external resource, like an LDAP.
    IsGroupRole bool
    True if this user has a group role.
    IsLocked bool
    If the user account has been locked due to too many invalid login attempts, the value will be true.
    ProviderType string
    Identity provider type for this user.
    Role string
    The role of the user.
    StoredVmQuota double
    Quota of vApps that this user can store. A value of 0 specifies an unlimited quota.
    Telephone string
    The Org User telephone number.
    Name string
    Org string
    UserId string
    DeployedVmQuota float64
    Quota of vApps that this user can deploy. A value of 0 specifies an unlimited quota.
    Description string
    An optional description of the user.
    EmailAddress string
    The Org User email address.
    Enabled bool
    True if the user is enabled and can log in.
    FullName string
    The full name of the user.
    GroupNames []string
    The set of group names to which this user belongs. It's only populated if the users are created after the group (with this user having a depends_on of the given group).
    Id string
    The ID of the Organization user
    InstantMessaging string
    The Org User instant messaging.
    IsExternal bool
    If the user account was imported from an external resource, like an LDAP.
    IsGroupRole bool
    True if this user has a group role.
    IsLocked bool
    If the user account has been locked due to too many invalid login attempts, the value will be true.
    ProviderType string
    Identity provider type for this user.
    Role string
    The role of the user.
    StoredVmQuota float64
    Quota of vApps that this user can store. A value of 0 specifies an unlimited quota.
    Telephone string
    The Org User telephone number.
    Name string
    Org string
    UserId string
    deployedVmQuota Double
    Quota of vApps that this user can deploy. A value of 0 specifies an unlimited quota.
    description String
    An optional description of the user.
    emailAddress String
    The Org User email address.
    enabled Boolean
    True if the user is enabled and can log in.
    fullName String
    The full name of the user.
    groupNames List<String>
    The set of group names to which this user belongs. It's only populated if the users are created after the group (with this user having a depends_on of the given group).
    id String
    The ID of the Organization user
    instantMessaging String
    The Org User instant messaging.
    isExternal Boolean
    If the user account was imported from an external resource, like an LDAP.
    isGroupRole Boolean
    True if this user has a group role.
    isLocked Boolean
    If the user account has been locked due to too many invalid login attempts, the value will be true.
    providerType String
    Identity provider type for this user.
    role String
    The role of the user.
    storedVmQuota Double
    Quota of vApps that this user can store. A value of 0 specifies an unlimited quota.
    telephone String
    The Org User telephone number.
    name String
    org String
    userId String
    deployedVmQuota number
    Quota of vApps that this user can deploy. A value of 0 specifies an unlimited quota.
    description string
    An optional description of the user.
    emailAddress string
    The Org User email address.
    enabled boolean
    True if the user is enabled and can log in.
    fullName string
    The full name of the user.
    groupNames string[]
    The set of group names to which this user belongs. It's only populated if the users are created after the group (with this user having a depends_on of the given group).
    id string
    The ID of the Organization user
    instantMessaging string
    The Org User instant messaging.
    isExternal boolean
    If the user account was imported from an external resource, like an LDAP.
    isGroupRole boolean
    True if this user has a group role.
    isLocked boolean
    If the user account has been locked due to too many invalid login attempts, the value will be true.
    providerType string
    Identity provider type for this user.
    role string
    The role of the user.
    storedVmQuota number
    Quota of vApps that this user can store. A value of 0 specifies an unlimited quota.
    telephone string
    The Org User telephone number.
    name string
    org string
    userId string
    deployed_vm_quota float
    Quota of vApps that this user can deploy. A value of 0 specifies an unlimited quota.
    description str
    An optional description of the user.
    email_address str
    The Org User email address.
    enabled bool
    True if the user is enabled and can log in.
    full_name str
    The full name of the user.
    group_names Sequence[str]
    The set of group names to which this user belongs. It's only populated if the users are created after the group (with this user having a depends_on of the given group).
    id str
    The ID of the Organization user
    instant_messaging str
    The Org User instant messaging.
    is_external bool
    If the user account was imported from an external resource, like an LDAP.
    is_group_role bool
    True if this user has a group role.
    is_locked bool
    If the user account has been locked due to too many invalid login attempts, the value will be true.
    provider_type str
    Identity provider type for this user.
    role str
    The role of the user.
    stored_vm_quota float
    Quota of vApps that this user can store. A value of 0 specifies an unlimited quota.
    telephone str
    The Org User telephone number.
    name str
    org str
    user_id str
    deployedVmQuota Number
    Quota of vApps that this user can deploy. A value of 0 specifies an unlimited quota.
    description String
    An optional description of the user.
    emailAddress String
    The Org User email address.
    enabled Boolean
    True if the user is enabled and can log in.
    fullName String
    The full name of the user.
    groupNames List<String>
    The set of group names to which this user belongs. It's only populated if the users are created after the group (with this user having a depends_on of the given group).
    id String
    The ID of the Organization user
    instantMessaging String
    The Org User instant messaging.
    isExternal Boolean
    If the user account was imported from an external resource, like an LDAP.
    isGroupRole Boolean
    True if this user has a group role.
    isLocked Boolean
    If the user account has been locked due to too many invalid login attempts, the value will be true.
    providerType String
    Identity provider type for this user.
    role String
    The role of the user.
    storedVmQuota Number
    Quota of vApps that this user can store. A value of 0 specifies an unlimited quota.
    telephone String
    The Org User telephone number.
    name String
    org String
    userId String

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware