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

cloudfoundry.getUser

Explore with Pulumi AI

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

    Gets information on a Cloud Foundry user.

    Example Usage

    The following example looks up an user named ‘myuser’.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const myuser = cloudfoundry.getUser({
        name: "myuser",
    });
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    myuser = cloudfoundry.get_user(name="myuser")
    
    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.LookupUser(ctx, &cloudfoundry.LookupUserArgs{
    			Name: "myuser",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var myuser = Cloudfoundry.GetUser.Invoke(new()
        {
            Name = "myuser",
        });
    
    });
    
    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.GetUserArgs;
    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 myuser = CloudfoundryFunctions.getUser(GetUserArgs.builder()
                .name("myuser")
                .build());
    
        }
    }
    
    variables:
      myuser:
        fn::invoke:
          function: cloudfoundry:getUser
          arguments:
            name: myuser
    

    Using getUser

    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 getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
    function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>
    def get_user(id: Optional[str] = None,
                 name: Optional[str] = None,
                 org_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetUserResult
    def get_user_output(id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 org_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
    func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
    func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput

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

    public static class GetUser 
    {
        public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
        public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
    public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudfoundry:index/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the user to look up
    Id string
    The GUID of the user
    OrgId string
    the org ID where to look for this user. Use this in case you are using an OrgAdmin account.
    Name string
    The name of the user to look up
    Id string
    The GUID of the user
    OrgId string
    the org ID where to look for this user. Use this in case you are using an OrgAdmin account.
    name String
    The name of the user to look up
    id String
    The GUID of the user
    orgId String
    the org ID where to look for this user. Use this in case you are using an OrgAdmin account.
    name string
    The name of the user to look up
    id string
    The GUID of the user
    orgId string
    the org ID where to look for this user. Use this in case you are using an OrgAdmin account.
    name str
    The name of the user to look up
    id str
    The GUID of the user
    org_id str
    the org ID where to look for this user. Use this in case you are using an OrgAdmin account.
    name String
    The name of the user to look up
    id String
    The GUID of the user
    orgId String
    the org ID where to look for this user. Use this in case you are using an OrgAdmin account.

    getUser Result

    The following output properties are available:

    Id string
    The GUID of the user
    Name string
    OrgId string
    Id string
    The GUID of the user
    Name string
    OrgId string
    id String
    The GUID of the user
    name String
    orgId String
    id string
    The GUID of the user
    name string
    orgId string
    id str
    The GUID of the user
    name str
    org_id str
    id String
    The GUID of the user
    name String
    orgId String

    Package Details

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