Viewing docs for Datadog v5.9.0
published on Saturday, Jul 25, 2026 by Pulumi
published on Saturday, Jul 25, 2026 by Pulumi
Viewing docs for Datadog v5.9.0
published on Saturday, Jul 25, 2026 by Pulumi
published on Saturday, Jul 25, 2026 by Pulumi
Retrieve information about the user associated with the authentication context used by the Datadog provider. This data source is also useful for retrieving organization metadata.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const me = datadog.getCurrentUser({});
const greeting = me.then(me => `Hello ${me.name}, your org id is ${me.orgId}`);
import pulumi
import pulumi_datadog as datadog
me = datadog.get_current_user()
greeting = f"Hello {me.name}, your org id is {me.org_id}"
package main
import (
"fmt"
"github.com/pulumi/pulumi-datadog/sdk/v5/go/datadog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
me, err := datadog.GetCurrentUser(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
_ := fmt.Sprintf("Hello %v, your org id is %v", me.Name, me.OrgId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
var me = Datadog.GetCurrentUser.Invoke();
var greeting = $"Hello {me.Apply(getCurrentUserResult => getCurrentUserResult.Name)}, your org id is {me.Apply(getCurrentUserResult => getCurrentUserResult.OrgId)}";
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.DatadogFunctions;
import java.util.ArrayList;
import java.util.Arrays;
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 me = DatadogFunctions.getCurrentUser(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
final var greeting = String.format("Hello %s, your org id is %s", me.name(),me.orgId());
}
}
variables:
me:
fn::invoke:
function: datadog:getCurrentUser
arguments: {}
greeting: Hello ${me.name}, your org id is ${me.orgId}
pulumi {
required_providers {
datadog = {
source = "pulumi/datadog"
}
}
}
data "datadog_getcurrentuser" "me" {
}
locals {
greeting ="Hello ${data.datadog_getcurrentuser.me.name}, your org id is ${data.datadog_getcurrentuser.me.org_id}"
}
Using getCurrentUser
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 getCurrentUser(opts?: InvokeOptions): Promise<GetCurrentUserResult>
function getCurrentUserOutput(opts?: InvokeOptions): Output<GetCurrentUserResult>def get_current_user(opts: Optional[InvokeOptions] = None) -> GetCurrentUserResult
def get_current_user_output(opts: Optional[InvokeOptions] = None) -> Output[GetCurrentUserResult]func GetCurrentUser(ctx *Context, opts ...InvokeOption) (*GetCurrentUserResult, error)
func GetCurrentUserOutput(ctx *Context, opts ...InvokeOption) GetCurrentUserResultOutput> Note: This function is named GetCurrentUser in the Go SDK.
public static class GetCurrentUser
{
public static Task<GetCurrentUserResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetCurrentUserResult> Invoke(InvokeOptions? opts = null)
}public static CompletableFuture<GetCurrentUserResult> getCurrentUser(InvokeOptions options)
public static Output<GetCurrentUserResult> getCurrentUser(InvokeOptions options)
fn::invoke:
function: datadog:index/getCurrentUser:getCurrentUser
arguments:
# arguments dictionarydata "datadog_get_current_user" "name" {
# arguments
}getCurrentUser Result
The following output properties are available:
- Email string
- Email of the user.
- Handle string
- The user's handle.
- Id string
- The ID of this resource.
- Name string
- Name of the user.
- Org
Id string - The UUID of the user's organization.
- Org
Name string - Name of the user's organization.
- Org
Public stringId - The publicId of the user's organization.
- Service
Account bool - Indicates whether the user is a service account.
- Email string
- Email of the user.
- Handle string
- The user's handle.
- Id string
- The ID of this resource.
- Name string
- Name of the user.
- Org
Id string - The UUID of the user's organization.
- Org
Name string - Name of the user's organization.
- Org
Public stringId - The publicId of the user's organization.
- Service
Account bool - Indicates whether the user is a service account.
- email string
- Email of the user.
- handle string
- The user's handle.
- id string
- The ID of this resource.
- name string
- Name of the user.
- org_
id string - The UUID of the user's organization.
- org_
name string - Name of the user's organization.
- org_
public_ stringid - The publicId of the user's organization.
- service_
account bool - Indicates whether the user is a service account.
- email String
- Email of the user.
- handle String
- The user's handle.
- id String
- The ID of this resource.
- name String
- Name of the user.
- org
Id String - The UUID of the user's organization.
- org
Name String - Name of the user's organization.
- org
Public StringId - The publicId of the user's organization.
- service
Account Boolean - Indicates whether the user is a service account.
- email string
- Email of the user.
- handle string
- The user's handle.
- id string
- The ID of this resource.
- name string
- Name of the user.
- org
Id string - The UUID of the user's organization.
- org
Name string - Name of the user's organization.
- org
Public stringId - The publicId of the user's organization.
- service
Account boolean - Indicates whether the user is a service account.
- email str
- Email of the user.
- handle str
- The user's handle.
- id str
- The ID of this resource.
- name str
- Name of the user.
- org_
id str - The UUID of the user's organization.
- org_
name str - Name of the user's organization.
- org_
public_ strid - The publicId of the user's organization.
- service_
account bool - Indicates whether the user is a service account.
- email String
- Email of the user.
- handle String
- The user's handle.
- id String
- The ID of this resource.
- name String
- Name of the user.
- org
Id String - The UUID of the user's organization.
- org
Name String - Name of the user's organization.
- org
Public StringId - The publicId of the user's organization.
- service
Account Boolean - Indicates whether the user is a service account.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadogTerraform Provider.
Viewing docs for Datadog v5.9.0
published on Saturday, Jul 25, 2026 by Pulumi
published on Saturday, Jul 25, 2026 by Pulumi