Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi
sumologic.getUser
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const this = sumologic.getUser({
id: "1234567890",
});
import pulumi
import pulumi_sumologic as sumologic
this = sumologic.get_user(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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;
return await Deployment.RunAsync(() =>
{
var @this = SumoLogic.GetUser.Invoke(new()
{
Id = "1234567890",
});
});
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());
}
}
variables:
this:
fn::invoke:
Function: sumologic:getUser
Arguments:
id: '1234567890'
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const that = sumologic.getUser({
email: "user@example.com",
});
import pulumi
import pulumi_sumologic as sumologic
that = sumologic.get_user(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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;
return await Deployment.RunAsync(() =>
{
var that = SumoLogic.GetUser.Invoke(new()
{
Email = "user@example.com",
});
});
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());
}
}
variables:
that:
fn::invoke:
Function: sumologic:getUser
Arguments:
email: user@example.com
A user can be looked up by either id
or email
. One of those attributes needs to be specified.
If both id
and email
have been specified, id
takes precedence.
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.
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:
getUser Result
The following output properties are available:
Package Details
- Repository
- Sumo Logic pulumi/pulumi-sumologic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sumologic
Terraform Provider.