1. Packages
  2. Sonarqube Provider
  3. API Docs
  4. getUser
sonarqube 0.16.14 published on Monday, Apr 14, 2025 by jdamata

sonarqube.getUser

Explore with Pulumi AI

sonarqube logo
sonarqube 0.16.14 published on Monday, Apr 14, 2025 by jdamata

    Use this data source to get a Sonarqube User resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sonarqube from "@pulumi/sonarqube";
    
    const user = sonarqube.getUser({
        loginName: "terraform-test",
    });
    
    import pulumi
    import pulumi_sonarqube as sonarqube
    
    user = sonarqube.get_user(login_name="terraform-test")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sonarqube/sonarqube"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sonarqube.LookupUser(ctx, &sonarqube.LookupUserArgs{
    			LoginName: "terraform-test",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Sonarqube = Pulumi.Sonarqube;
    
    return await Deployment.RunAsync(() => 
    {
        var user = Sonarqube.GetUser.Invoke(new()
        {
            LoginName = "terraform-test",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sonarqube.SonarqubeFunctions;
    import com.pulumi.sonarqube.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 user = SonarqubeFunctions.getUser(GetUserArgs.builder()
                .loginName("terraform-test")
                .build());
    
        }
    }
    
    variables:
      user:
        fn::invoke:
          function: sonarqube:getUser
          arguments:
            loginName: terraform-test
    

    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,
                 login_name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetUserResult
    def get_user_output(id: Optional[pulumi.Input[str]] = None,
                 login_name: 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: sonarqube:index/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    LoginName string
    The login name of the user
    Id string
    The ID of this resource.
    LoginName string
    The login name of the user
    Id string
    The ID of this resource.
    loginName String
    The login name of the user
    id String
    The ID of this resource.
    loginName string
    The login name of the user
    id string
    The ID of this resource.
    login_name str
    The login name of the user
    id str
    The ID of this resource.
    loginName String
    The login name of the user
    id String
    The ID of this resource.

    getUser Result

    The following output properties are available:

    Email string
    The email of the user
    Id string
    The ID of this resource.
    IsLocal bool
    Whether the user is local
    LoginName string
    The login name of the user
    Name string
    The name of the user
    Email string
    The email of the user
    Id string
    The ID of this resource.
    IsLocal bool
    Whether the user is local
    LoginName string
    The login name of the user
    Name string
    The name of the user
    email String
    The email of the user
    id String
    The ID of this resource.
    isLocal Boolean
    Whether the user is local
    loginName String
    The login name of the user
    name String
    The name of the user
    email string
    The email of the user
    id string
    The ID of this resource.
    isLocal boolean
    Whether the user is local
    loginName string
    The login name of the user
    name string
    The name of the user
    email str
    The email of the user
    id str
    The ID of this resource.
    is_local bool
    Whether the user is local
    login_name str
    The login name of the user
    name str
    The name of the user
    email String
    The email of the user
    id String
    The ID of this resource.
    isLocal Boolean
    Whether the user is local
    loginName String
    The login name of the user
    name String
    The name of the user

    Package Details

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