1. Packages
  2. Datadog
  3. API Docs
  4. getUser
Datadog v4.27.0 published on Thursday, Mar 14, 2024 by Pulumi

datadog.getUser

Explore with Pulumi AI

datadog logo
Datadog v4.27.0 published on Thursday, Mar 14, 2024 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",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    test = datadog.get_user(filter="user.name@company.com")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: datadog:getUser
          Arguments:
            filter: user.name@company.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(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]
    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: datadog:index/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filter 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 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 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 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 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 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:

    Email string
    Email of the user.
    Filter string
    Filter all users by the given string.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the user.
    ExactMatch bool
    When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
    Email string
    Email of the user.
    Filter string
    Filter all users by the given string.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the user.
    ExactMatch bool
    When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
    email String
    Email of the user.
    filter String
    Filter all users by the given string.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the user.
    exactMatch Boolean
    When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
    email string
    Email of the user.
    filter string
    Filter all users by the given string.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the user.
    exactMatch boolean
    When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
    email str
    Email of the user.
    filter str
    Filter all users by the given string.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the user.
    exact_match bool
    When true, filter string is exact matched against the user's email, followed by name attribute. Defaults to false.
    email String
    Email of the user.
    filter String
    Filter all users by the given string.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the user.
    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 logo
    Datadog v4.27.0 published on Thursday, Mar 14, 2024 by Pulumi