Datadog

Pulumi Official
Package maintained by Pulumi
v4.9.0 published on Thursday, May 26, 2022 by Pulumi

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/v4/go/datadog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datadog.LookupRole(ctx, &GetRoleArgs{
			Filter: "Datadog Standard Role",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = Output.of(DatadogFunctions.getRole(GetRoleArgs.builder()
            .filter("Datadog Standard Role")
            .build()));

    }
}
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",
}));
variables:
  test:
    Fn::Invoke:
      Function: datadog:getRole
      Arguments:
        filter: Datadog Standard Role

Using getRole

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 getRole(args: GetRoleArgs, opts?: InvokeOptions): Promise<GetRoleResult>
function getRoleOutput(args: GetRoleOutputArgs, opts?: InvokeOptions): Output<GetRoleResult>
def get_role(filter: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetRoleResult
def get_role_output(filter: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetRoleResult]
func LookupRole(ctx *Context, args *LookupRoleArgs, opts ...InvokeOption) (*LookupRoleResult, error)
func LookupRoleOutput(ctx *Context, args *LookupRoleOutputArgs, opts ...InvokeOption) LookupRoleResultOutput

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

public static class GetRole 
{
    public static Task<GetRoleResult> InvokeAsync(GetRoleArgs args, InvokeOptions? opts = null)
    public static Output<GetRoleResult> Invoke(GetRoleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: datadog:index/getRole:getRole
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filter string
Filter string
filter String
filter string
filter str
filter String

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 Integer
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
filter String
id String

The provider-assigned unique ID for this managed resource.

name String
userCount Number

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes

This Pulumi package is based on the datadog Terraform Provider.