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

datadog.getRoles

Explore with Pulumi AI

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

Use this data source to retrieve information about multiple roles for use in other resources.

Example Usage

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

const foo = datadog.getRoles({
    filter: "Datadog",
});
Copy
import pulumi
import pulumi_datadog as datadog

foo = datadog.get_roles(filter="Datadog")
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.GetRoles(ctx, &datadog.GetRolesArgs{
			Filter: pulumi.StringRef("Datadog"),
		}, 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 foo = Datadog.GetRoles.Invoke(new()
    {
        Filter = "Datadog",
    });

});
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.GetRolesArgs;
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 foo = DatadogFunctions.getRoles(GetRolesArgs.builder()
            .filter("Datadog")
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: datadog:getRoles
      arguments:
        filter: Datadog
Copy

Using getRoles

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 getRoles(args: GetRolesArgs, opts?: InvokeOptions): Promise<GetRolesResult>
function getRolesOutput(args: GetRolesOutputArgs, opts?: InvokeOptions): Output<GetRolesResult>
Copy
def get_roles(filter: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetRolesResult
def get_roles_output(filter: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetRolesResult]
Copy
func GetRoles(ctx *Context, args *GetRolesArgs, opts ...InvokeOption) (*GetRolesResult, error)
func GetRolesOutput(ctx *Context, args *GetRolesOutputArgs, opts ...InvokeOption) GetRolesResultOutput
Copy

> Note: This function is named GetRoles in the Go SDK.

public static class GetRoles 
{
    public static Task<GetRolesResult> InvokeAsync(GetRolesArgs args, InvokeOptions? opts = null)
    public static Output<GetRolesResult> Invoke(GetRolesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRolesResult> getRoles(GetRolesArgs args, InvokeOptions options)
public static Output<GetRolesResult> getRoles(GetRolesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: datadog:index/getRoles:getRoles
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filter string
Filter all roles by the given string.
Filter string
Filter all roles by the given string.
filter String
Filter all roles by the given string.
filter string
Filter all roles by the given string.
filter str
Filter all roles by the given string.
filter String
Filter all roles by the given string.

getRoles Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Roles List<GetRolesRole>
List of Roles
Filter string
Filter all roles by the given string.
Id string
The provider-assigned unique ID for this managed resource.
Roles []GetRolesRole
List of Roles
Filter string
Filter all roles by the given string.
id String
The provider-assigned unique ID for this managed resource.
roles List<GetRolesRole>
List of Roles
filter String
Filter all roles by the given string.
id string
The provider-assigned unique ID for this managed resource.
roles GetRolesRole[]
List of Roles
filter string
Filter all roles by the given string.
id str
The provider-assigned unique ID for this managed resource.
roles Sequence[GetRolesRole]
List of Roles
filter str
Filter all roles by the given string.
id String
The provider-assigned unique ID for this managed resource.
roles List<Property Map>
List of Roles
filter String
Filter all roles by the given string.

Supporting Types

GetRolesRole

Id This property is required. string
ID of the Datadog role
Name This property is required. string
Name of the Datadog role
UserCount This property is required. int
Number of users that have this role.
Id This property is required. string
ID of the Datadog role
Name This property is required. string
Name of the Datadog role
UserCount This property is required. int
Number of users that have this role.
id This property is required. String
ID of the Datadog role
name This property is required. String
Name of the Datadog role
userCount This property is required. Integer
Number of users that have this role.
id This property is required. string
ID of the Datadog role
name This property is required. string
Name of the Datadog role
userCount This property is required. number
Number of users that have this role.
id This property is required. str
ID of the Datadog role
name This property is required. str
Name of the Datadog role
user_count This property is required. int
Number of users that have this role.
id This property is required. String
ID of the Datadog role
name This property is required. String
Name of the Datadog role
userCount This property is required. Number
Number of users that have this role.

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