Datadog v4.33.2 published on Tuesday, Sep 24, 2024 by Pulumi
datadog.getRoles
Explore with Pulumi AI
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",
});
import pulumi
import pulumi_datadog as datadog
foo = datadog.get_roles(filter="Datadog")
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
})
}
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",
});
});
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());
}
}
variables:
foo:
fn::invoke:
Function: datadog:getRoles
Arguments:
filter: Datadog
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>
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]
func GetRoles(ctx *Context, args *GetRolesArgs, opts ...InvokeOption) (*GetRolesResult, error)
func GetRolesOutput(ctx *Context, args *GetRolesOutputArgs, opts ...InvokeOption) GetRolesResultOutput
> 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)
}
public static CompletableFuture<GetRolesResult> getRoles(GetRolesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: datadog:index/getRoles:getRoles
arguments:
# arguments dictionary
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<Get
Roles Role> - List of Roles
- Filter string
- Filter all roles by the given string.
- Id string
- The provider-assigned unique ID for this managed resource.
- Roles
[]Get
Roles Role - 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<Get
Roles Role> - List of Roles
- filter String
- Filter all roles by the given string.
- id string
- The provider-assigned unique ID for this managed resource.
- roles
Get
Roles Role[] - 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[Get
Roles Role] - 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 str
- ID of the Datadog role
- name str
- Name of the Datadog role
- user_
count int - 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.