Datadog v4.28.1 published on Monday, Jun 24, 2024 by Pulumi
datadog.getUsers
Explore with Pulumi AI
Use this data source to retrieve information about existing users for use in other resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const test = datadog.getUsers({
filter: "user.name@company.com",
filterStatus: "Active,Pending",
});
import pulumi
import pulumi_datadog as datadog
test = datadog.get_users(filter="user.name@company.com",
filter_status="Active,Pending")
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.GetUsers(ctx, &datadog.GetUsersArgs{
Filter: pulumi.StringRef("user.name@company.com"),
FilterStatus: pulumi.StringRef("Active,Pending"),
}, 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.GetUsers.Invoke(new()
{
Filter = "user.name@company.com",
FilterStatus = "Active,Pending",
});
});
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.GetUsersArgs;
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.getUsers(GetUsersArgs.builder()
.filter("user.name@company.com")
.filterStatus("Active,Pending")
.build());
}
}
variables:
test:
fn::invoke:
Function: datadog:getUsers
Arguments:
filter: user.name@company.com
filterStatus: Active,Pending
Using getUsers
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 getUsers(args: GetUsersArgs, opts?: InvokeOptions): Promise<GetUsersResult>
function getUsersOutput(args: GetUsersOutputArgs, opts?: InvokeOptions): Output<GetUsersResult>
def get_users(filter: Optional[str] = None,
filter_status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUsersResult
def get_users_output(filter: Optional[pulumi.Input[str]] = None,
filter_status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUsersResult]
func GetUsers(ctx *Context, args *GetUsersArgs, opts ...InvokeOption) (*GetUsersResult, error)
func GetUsersOutput(ctx *Context, args *GetUsersOutputArgs, opts ...InvokeOption) GetUsersResultOutput
> Note: This function is named GetUsers
in the Go SDK.
public static class GetUsers
{
public static Task<GetUsersResult> InvokeAsync(GetUsersArgs args, InvokeOptions? opts = null)
public static Output<GetUsersResult> Invoke(GetUsersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUsersResult> getUsers(GetUsersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: datadog:index/getUsers:getUsers
arguments:
# arguments dictionary
The following arguments are supported:
- Filter string
- Filter all users by the given string.
- Filter
Status string - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- Filter string
- Filter all users by the given string.
- Filter
Status string - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- filter String
- Filter all users by the given string.
- filter
Status String - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- filter string
- Filter all users by the given string.
- filter
Status string - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- filter str
- Filter all users by the given string.
- filter_
status str - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- filter String
- Filter all users by the given string.
- filter
Status String - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
getUsers Result
The following output properties are available:
- Id string
- The ID of this resource.
- Users
List<Get
Users User> - List of users
- Filter string
- Filter all users by the given string.
- Filter
Status string - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- Id string
- The ID of this resource.
- Users
[]Get
Users User - List of users
- Filter string
- Filter all users by the given string.
- Filter
Status string - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- id String
- The ID of this resource.
- users
List<Get
Users User> - List of users
- filter String
- Filter all users by the given string.
- filter
Status String - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- id string
- The ID of this resource.
- users
Get
Users User[] - List of users
- filter string
- Filter all users by the given string.
- filter
Status string - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- id str
- The ID of this resource.
- users
Sequence[Get
Users User] - List of users
- filter str
- Filter all users by the given string.
- filter_
status str - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
- id String
- The ID of this resource.
- users List<Property Map>
- List of users
- filter String
- Filter all users by the given string.
- filter
Status String - Filter on status attribute. Comma-separated list with possible values of Active, Pending, and Disabled.
Supporting Types
GetUsersUser
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.