1. Packages
  2. Datadog Provider
  3. API Docs
  4. getUser
Datadog v4.49.0 published on Thursday, Apr 17, 2025 by Pulumi

datadog.getUser

Explore with Pulumi AI

Datadog v4.49.0 published on Thursday, Apr 17, 2025 by Pulumi

Use this data source to retrieve information about an existing user to use it in an other resources.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const test = datadog.getUser({
    filter: "user.name@company.com",
});
Copy
import pulumi
import pulumi_datadog as datadog

test = datadog.get_user(filter="user.name@company.com")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datadog.LookupUser(ctx, &datadog.LookupUserArgs{
			Filter: "user.name@company.com",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;

return await Deployment.RunAsync(() => 
{
    var test = Datadog.GetUser.Invoke(new()
    {
        Filter = "user.name@company.com",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.DatadogFunctions;
import com.pulumi.datadog.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 test = DatadogFunctions.getUser(GetUserArgs.builder()
            .filter("user.name@company.com")
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: datadog:getUser
      arguments:
        filter: user.name@company.com
Copy

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>
Copy
def get_user(exact_match: Optional[bool] = None,
             filter: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(exact_match: Optional[pulumi.Input[bool]] = None,
             filter: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
Copy
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: datadog:index/getUser:getUser
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filter This property is required. string
Filter all users by the given string.
ExactMatch bool
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
Filter This property is required. string
Filter all users by the given string.
ExactMatch bool
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
filter This property is required. String
Filter all users by the given string.
exactMatch Boolean
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
filter This property is required. string
Filter all users by the given string.
exactMatch boolean
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
filter This property is required. str
Filter all users by the given string.
exact_match bool
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
filter This property is required. String
Filter all users by the given string.
exactMatch Boolean
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.

getUser Result

The following output properties are available:

CreatedAt string
The time when the user was created (RFC3339 format).
Disabled bool
Indicates whether the user is disabled.
Email string
Email of the user.
Filter string
Filter all users by the given string.
Handle string
The user's handle.
Icon string
The URL where the user's icon is located.
Id string
The provider-assigned unique ID for this managed resource.
MfaEnabled bool
Indicates whether the user has enabled MFA.
ModifiedAt string
The time at which the user was last updated (RFC3339 format).
Name string
Name of the user.
ServiceAccount bool
Indicates whether the user is a service account.
Status string
The user's status.
Title string
The user's title.
Verified bool
Indicates whether the user is verified.
ExactMatch bool
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
CreatedAt string
The time when the user was created (RFC3339 format).
Disabled bool
Indicates whether the user is disabled.
Email string
Email of the user.
Filter string
Filter all users by the given string.
Handle string
The user's handle.
Icon string
The URL where the user's icon is located.
Id string
The provider-assigned unique ID for this managed resource.
MfaEnabled bool
Indicates whether the user has enabled MFA.
ModifiedAt string
The time at which the user was last updated (RFC3339 format).
Name string
Name of the user.
ServiceAccount bool
Indicates whether the user is a service account.
Status string
The user's status.
Title string
The user's title.
Verified bool
Indicates whether the user is verified.
ExactMatch bool
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
createdAt String
The time when the user was created (RFC3339 format).
disabled Boolean
Indicates whether the user is disabled.
email String
Email of the user.
filter String
Filter all users by the given string.
handle String
The user's handle.
icon String
The URL where the user's icon is located.
id String
The provider-assigned unique ID for this managed resource.
mfaEnabled Boolean
Indicates whether the user has enabled MFA.
modifiedAt String
The time at which the user was last updated (RFC3339 format).
name String
Name of the user.
serviceAccount Boolean
Indicates whether the user is a service account.
status String
The user's status.
title String
The user's title.
verified Boolean
Indicates whether the user is verified.
exactMatch Boolean
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
createdAt string
The time when the user was created (RFC3339 format).
disabled boolean
Indicates whether the user is disabled.
email string
Email of the user.
filter string
Filter all users by the given string.
handle string
The user's handle.
icon string
The URL where the user's icon is located.
id string
The provider-assigned unique ID for this managed resource.
mfaEnabled boolean
Indicates whether the user has enabled MFA.
modifiedAt string
The time at which the user was last updated (RFC3339 format).
name string
Name of the user.
serviceAccount boolean
Indicates whether the user is a service account.
status string
The user's status.
title string
The user's title.
verified boolean
Indicates whether the user is verified.
exactMatch boolean
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
created_at str
The time when the user was created (RFC3339 format).
disabled bool
Indicates whether the user is disabled.
email str
Email of the user.
filter str
Filter all users by the given string.
handle str
The user's handle.
icon str
The URL where the user's icon is located.
id str
The provider-assigned unique ID for this managed resource.
mfa_enabled bool
Indicates whether the user has enabled MFA.
modified_at str
The time at which the user was last updated (RFC3339 format).
name str
Name of the user.
service_account bool
Indicates whether the user is a service account.
status str
The user's status.
title str
The user's title.
verified bool
Indicates whether the user is verified.
exact_match bool
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
createdAt String
The time when the user was created (RFC3339 format).
disabled Boolean
Indicates whether the user is disabled.
email String
Email of the user.
filter String
Filter all users by the given string.
handle String
The user's handle.
icon String
The URL where the user's icon is located.
id String
The provider-assigned unique ID for this managed resource.
mfaEnabled Boolean
Indicates whether the user has enabled MFA.
modifiedAt String
The time at which the user was last updated (RFC3339 format).
name String
Name of the user.
serviceAccount Boolean
Indicates whether the user is a service account.
status String
The user's status.
title String
The user's title.
verified Boolean
Indicates whether the user is verified.
exactMatch Boolean
When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.

Package Details

Repository
Datadog pulumi/pulumi-datadog
License
Apache-2.0
Notes
This Pulumi package is based on the datadog Terraform Provider.
Datadog v4.49.0 published on Thursday, Apr 17, 2025 by Pulumi