1. Packages
  2. Datadog Provider
  3. API Docs
  4. getRoles
Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi

datadog.getRoles

Explore with Pulumi AI

datadog logo
Datadog v4.34.0 published on Friday, Oct 4, 2024 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",
    });
    
    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<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 string
    ID of the Datadog role
    Name string
    Name of the Datadog role
    UserCount int
    Number of users that have this role.
    Id string
    ID of the Datadog role
    Name string
    Name of the Datadog role
    UserCount int
    Number of users that have this role.
    id String
    ID of the Datadog role
    name String
    Name of the Datadog role
    userCount Integer
    Number of users that have this role.
    id string
    ID of the Datadog role
    name string
    Name of the Datadog role
    userCount number
    Number of users that have this role.
    id str
    ID of the Datadog role
    name str
    Name of the Datadog role
    user_count int
    Number of users that have this role.
    id String
    ID of the Datadog role
    name String
    Name of the Datadog role
    userCount 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 logo
    Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi