sumologic logo
Sumo Logic v0.11.0, Jan 18 23

sumologic.getUser

Attributes reference

The following attributes are exported:

  • id - The internal ID of the user.
  • email - (Required) Email of the user.
  • first_name - (Required) First name of the user.
  • last_name - (Required) Last name of the user.
  • is_active - (Required) This has the value true if the user is active and false if they have been deactivated.
  • role_ids - (Required) List of roleIds associated with the user.

Example Usage

using System.Collections.Generic;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;

return await Deployment.RunAsync(() => 
{
    var @this = SumoLogic.GetUser.Invoke(new()
    {
        Id = "1234567890",
    });

});
package main

import (
	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sumologic.LookupUser(ctx, &sumologic.LookupUserArgs{
			Id: pulumi.StringRef("1234567890"),
		}, 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.sumologic.SumologicFunctions;
import com.pulumi.sumologic.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 this = SumologicFunctions.getUser(GetUserArgs.builder()
            .id("1234567890")
            .build());

    }
}
import pulumi
import pulumi_sumologic as sumologic

this = sumologic.get_user(id="1234567890")
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";

const this = sumologic.getUser({
    id: "1234567890",
});
variables:
  this:
    fn::invoke:
      Function: sumologic:getUser
      Arguments:
        id: '1234567890'
using System.Collections.Generic;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;

return await Deployment.RunAsync(() => 
{
    var that = SumoLogic.GetUser.Invoke(new()
    {
        Email = "user@example.com",
    });

});
package main

import (
	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sumologic.LookupUser(ctx, &sumologic.LookupUserArgs{
			Email: pulumi.StringRef("user@example.com"),
		}, 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.sumologic.SumologicFunctions;
import com.pulumi.sumologic.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 that = SumologicFunctions.getUser(GetUserArgs.builder()
            .email("user@example.com")
            .build());

    }
}
import pulumi
import pulumi_sumologic as sumologic

that = sumologic.get_user(email="user@example.com")
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";

const that = sumologic.getUser({
    email: "user@example.com",
});
variables:
  that:
    fn::invoke:
      Function: sumologic:getUser
      Arguments:
        email: user@example.com

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

The following arguments are supported:

Email string
Id string
Email string
Id string
email String
id String
email string
id string
email str
id str
email String
id String

getUser Result

The following output properties are available:

Email string
FirstName string
Id string
IsActive bool
LastName string
RoleIds List<string>
Email string
FirstName string
Id string
IsActive bool
LastName string
RoleIds []string
email String
firstName String
id String
isActive Boolean
lastName String
roleIds List<String>
email string
firstName string
id string
isActive boolean
lastName string
roleIds string[]
email str
first_name str
id str
is_active bool
last_name str
role_ids Sequence[str]
email String
firstName String
id String
isActive Boolean
lastName String
roleIds List<String>

Package Details

Repository
Sumo Logic pulumi/pulumi-sumologic
License
Apache-2.0
Notes

This Pulumi package is based on the sumologic Terraform Provider.