Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi
datadog.getRole
Explore with Pulumi AI
Use this data source to retrieve information about an existing role for use in other resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const test = datadog.getRole({
filter: "Datadog Standard Role",
});
import pulumi
import pulumi_datadog as datadog
test = datadog.get_role(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, &datadog.LookupRoleArgs{
Filter: "Datadog Standard Role",
}, 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 test = Datadog.GetRole.Invoke(new()
{
Filter = "Datadog Standard Role",
});
});
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.GetRoleArgs;
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 test = DatadogFunctions.getRole(GetRoleArgs.builder()
.filter("Datadog Standard Role")
.build());
}
}
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
- A string on which to filter the roles.
- Filter string
- A string on which to filter the roles.
- filter String
- A string on which to filter the roles.
- filter string
- A string on which to filter the roles.
- filter str
- A string on which to filter the roles.
- filter String
- A string on which to filter the roles.
getRole Result
The following output properties are available:
- filter str
- A string on which to filter the roles.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Name of the role.
- user_
count int - Number of users assigned to this role.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.