1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. getUser
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.platform.getUser

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    Data source for retrieving the user based on the API key.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Harness.Platform.GetUser.Invoke(new()
        {
            Email = "john.doe@harness.io",
            OrgId = "org_id",
            ProjectId = "project_id",
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.LookupUser(ctx, &platform.LookupUserArgs{
    			Email:     "john.doe@harness.io",
    			OrgId:     pulumi.StringRef("org_id"),
    			ProjectId: pulumi.StringRef("project_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.PlatformFunctions;
    import com.pulumi.harness.platform.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 example = PlatformFunctions.getUser(GetUserArgs.builder()
                .email("john.doe@harness.io")
                .orgId("org_id")
                .projectId("project_id")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_harness as harness
    
    example = harness.platform.get_user(email="john.doe@harness.io",
        org_id="org_id",
        project_id="project_id")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const example = harness.platform.getUser({
        email: "john.doe@harness.io",
        orgId: "org_id",
        projectId: "project_id",
    });
    
    variables:
      example:
        fn::invoke:
          Function: harness:platform:getUser
          Arguments:
            email: john.doe@harness.io
            orgId: org_id
            projectId: project_id
    

    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(email: Optional[str] = None,
                 org_id: Optional[str] = None,
                 project_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetUserResult
    def get_user_output(email: Optional[pulumi.Input[str]] = None,
                 org_id: Optional[pulumi.Input[str]] = None,
                 project_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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: harness:platform/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Email string
    The email of the user.
    OrgId string
    Organization identifier of the user.
    ProjectId string
    Project identifier of the user.
    Email string
    The email of the user.
    OrgId string
    Organization identifier of the user.
    ProjectId string
    Project identifier of the user.
    email String
    The email of the user.
    orgId String
    Organization identifier of the user.
    projectId String
    Project identifier of the user.
    email string
    The email of the user.
    orgId string
    Organization identifier of the user.
    projectId string
    Project identifier of the user.
    email str
    The email of the user.
    org_id str
    Organization identifier of the user.
    project_id str
    Project identifier of the user.
    email String
    The email of the user.
    orgId String
    Organization identifier of the user.
    projectId String
    Project identifier of the user.

    getUser Result

    The following output properties are available:

    Disabled bool
    Whether or not the user account is disabled.
    Email string
    The email of the user.
    ExternallyManaged bool
    Whether or not the user account is externally managed.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the user.
    Locked bool
    Whether or not the user account is locked.
    Name string
    Name of the user.
    OrgId string
    Organization identifier of the user.
    ProjectId string
    Project identifier of the user.
    Disabled bool
    Whether or not the user account is disabled.
    Email string
    The email of the user.
    ExternallyManaged bool
    Whether or not the user account is externally managed.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the user.
    Locked bool
    Whether or not the user account is locked.
    Name string
    Name of the user.
    OrgId string
    Organization identifier of the user.
    ProjectId string
    Project identifier of the user.
    disabled Boolean
    Whether or not the user account is disabled.
    email String
    The email of the user.
    externallyManaged Boolean
    Whether or not the user account is externally managed.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the user.
    locked Boolean
    Whether or not the user account is locked.
    name String
    Name of the user.
    orgId String
    Organization identifier of the user.
    projectId String
    Project identifier of the user.
    disabled boolean
    Whether or not the user account is disabled.
    email string
    The email of the user.
    externallyManaged boolean
    Whether or not the user account is externally managed.
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Unique identifier of the user.
    locked boolean
    Whether or not the user account is locked.
    name string
    Name of the user.
    orgId string
    Organization identifier of the user.
    projectId string
    Project identifier of the user.
    disabled bool
    Whether or not the user account is disabled.
    email str
    The email of the user.
    externally_managed bool
    Whether or not the user account is externally managed.
    id str
    The provider-assigned unique ID for this managed resource.
    identifier str
    Unique identifier of the user.
    locked bool
    Whether or not the user account is locked.
    name str
    Name of the user.
    org_id str
    Organization identifier of the user.
    project_id str
    Project identifier of the user.
    disabled Boolean
    Whether or not the user account is disabled.
    email String
    The email of the user.
    externallyManaged Boolean
    Whether or not the user account is externally managed.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the user.
    locked Boolean
    Whether or not the user account is locked.
    name String
    Name of the user.
    orgId String
    Organization identifier of the user.
    projectId String
    Project identifier of the user.

    Package Details

    Repository
    harness lbrlabs/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs