1. Packages
  2. Nexus Provider
  3. API Docs
  4. getSecurityUser
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

nexus.getSecurityUser

Explore with Pulumi AI

nexus logo
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

    Use this data source to get a user data structure.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nexus from "@pulumi/nexus";
    
    const admin = nexus.getSecurityUser({
        userid: "admin",
    });
    
    import pulumi
    import pulumi_nexus as nexus
    
    admin = nexus.get_security_user(userid="admin")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nexus.LookupSecurityUser(ctx, &nexus.LookupSecurityUserArgs{
    			Userid: "admin",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nexus = Pulumi.Nexus;
    
    return await Deployment.RunAsync(() => 
    {
        var admin = Nexus.GetSecurityUser.Invoke(new()
        {
            Userid = "admin",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nexus.NexusFunctions;
    import com.pulumi.nexus.inputs.GetSecurityUserArgs;
    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 admin = NexusFunctions.getSecurityUser(GetSecurityUserArgs.builder()
                .userid("admin")
                .build());
    
        }
    }
    
    variables:
      admin:
        fn::invoke:
          function: nexus:getSecurityUser
          arguments:
            userid: admin
    

    Using getSecurityUser

    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 getSecurityUser(args: GetSecurityUserArgs, opts?: InvokeOptions): Promise<GetSecurityUserResult>
    function getSecurityUserOutput(args: GetSecurityUserOutputArgs, opts?: InvokeOptions): Output<GetSecurityUserResult>
    def get_security_user(userid: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetSecurityUserResult
    def get_security_user_output(userid: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetSecurityUserResult]
    func LookupSecurityUser(ctx *Context, args *LookupSecurityUserArgs, opts ...InvokeOption) (*LookupSecurityUserResult, error)
    func LookupSecurityUserOutput(ctx *Context, args *LookupSecurityUserOutputArgs, opts ...InvokeOption) LookupSecurityUserResultOutput

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

    public static class GetSecurityUser 
    {
        public static Task<GetSecurityUserResult> InvokeAsync(GetSecurityUserArgs args, InvokeOptions? opts = null)
        public static Output<GetSecurityUserResult> Invoke(GetSecurityUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecurityUserResult> getSecurityUser(GetSecurityUserArgs args, InvokeOptions options)
    public static Output<GetSecurityUserResult> getSecurityUser(GetSecurityUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nexus:index/getSecurityUser:getSecurityUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Userid string
    The userid which is required for login
    Userid string
    The userid which is required for login
    userid String
    The userid which is required for login
    userid string
    The userid which is required for login
    userid str
    The userid which is required for login
    userid String
    The userid which is required for login

    getSecurityUser Result

    The following output properties are available:

    Email string
    The email address associated with the user.
    Firstname string
    The first name of the user.
    Id string
    Used to identify data source at nexus
    Lastname string
    The last name of the user.
    Roles List<string>
    The roles which the user has been assigned within Nexus.
    Status string
    The user's status, e.g. active or disabled.
    Userid string
    The userid which is required for login
    Email string
    The email address associated with the user.
    Firstname string
    The first name of the user.
    Id string
    Used to identify data source at nexus
    Lastname string
    The last name of the user.
    Roles []string
    The roles which the user has been assigned within Nexus.
    Status string
    The user's status, e.g. active or disabled.
    Userid string
    The userid which is required for login
    email String
    The email address associated with the user.
    firstname String
    The first name of the user.
    id String
    Used to identify data source at nexus
    lastname String
    The last name of the user.
    roles List<String>
    The roles which the user has been assigned within Nexus.
    status String
    The user's status, e.g. active or disabled.
    userid String
    The userid which is required for login
    email string
    The email address associated with the user.
    firstname string
    The first name of the user.
    id string
    Used to identify data source at nexus
    lastname string
    The last name of the user.
    roles string[]
    The roles which the user has been assigned within Nexus.
    status string
    The user's status, e.g. active or disabled.
    userid string
    The userid which is required for login
    email str
    The email address associated with the user.
    firstname str
    The first name of the user.
    id str
    Used to identify data source at nexus
    lastname str
    The last name of the user.
    roles Sequence[str]
    The roles which the user has been assigned within Nexus.
    status str
    The user's status, e.g. active or disabled.
    userid str
    The userid which is required for login
    email String
    The email address associated with the user.
    firstname String
    The first name of the user.
    id String
    Used to identify data source at nexus
    lastname String
    The last name of the user.
    roles List<String>
    The roles which the user has been assigned within Nexus.
    status String
    The user's status, e.g. active or disabled.
    userid String
    The userid which is required for login

    Package Details

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