Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getRole

Use this data source to retrieve information about an existing role for use in other resources.

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Datadog.GetRole.InvokeAsync(new Datadog.GetRoleArgs
        {
            Filter = "Datadog Standard Role",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-datadog/sdk/v2/go/datadog"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := datadog.LookupRole(ctx, &datadog.LookupRoleArgs{
            Filter: "Datadog Standard Role",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_datadog as datadog

test = datadog.get_role(filter="Datadog Standard Role")
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const test = pulumi.output(datadog.getRole({
    filter: "Datadog Standard Role",
}, { async: true }));

Using getRole

function getRole(args: GetRoleArgs, opts?: InvokeOptions): Promise<GetRoleResult>
def get_role(filter: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetRoleResult
func LookupRole(ctx *Context, args *LookupRoleArgs, opts ...InvokeOption) (*LookupRoleResult, error)

Note: This function is named LookupRole in the Go SDK.

public static class GetRole {
    public static Task<GetRoleResult> InvokeAsync(GetRoleArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filter string
Filter string
filter string
filter str

getRole Result

The following output properties are available:

Filter string
Id string

The provider-assigned unique ID for this managed resource.

Name string
UserCount int
Filter string
Id string

The provider-assigned unique ID for this managed resource.

Name string
UserCount int
filter string
id string

The provider-assigned unique ID for this managed resource.

name string
userCount number
filter str
id str

The provider-assigned unique ID for this managed resource.

name str
user_count int

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes
This Pulumi package is based on the datadog Terraform Provider.