astra logo
astra v1.0.35, Jul 27 22

astra.getRoles

astra.Role provides a datasource that lists the custom roles for an org.

Example Usage

using Pulumi;
using Astra = Pulumi.Astra;

class MyStack : Stack
{
    public MyStack()
    {
        var dev = Output.Create(Astra.GetRoles.InvokeAsync(new Astra.GetRolesArgs
        {
            RoleId = "role-id-here",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-astra/sdk/go/astra"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-astra/sdk/go/astra"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := astra.GetRoles(ctx, &GetRolesArgs{
			RoleId: "role-id-here",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.astra.AstraFunctions;
import com.pulumi.astra.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 dev = AstraFunctions.getRoles(GetRolesArgs.builder()
            .roleId("role-id-here")
            .build());

    }
}
import pulumi
import pulumi_astra as astra

dev = astra.get_roles(role_id="role-id-here")
import * as pulumi from "@pulumi/pulumi";
import * as astra from "@pulumi/astra";

const dev = pulumi.output(astra.getRoles({
    roleId: "role-id-here",
}));
variables:
  dev:
    Fn::Invoke:
      Function: astra:getRoles
      Arguments:
        roleId: role-id-here

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(role_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetRolesResult
def get_roles_output(role_id: 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: astra:index/getRoles:getRoles
  arguments:
    # arguments dictionary

The following arguments are supported:

RoleId string
RoleId string
roleId String
roleId string
roleId String

getRoles Result

The following output properties are available:

Description string
Effect string
Id string

The provider-assigned unique ID for this managed resource.

Policies List<string>
Resources List<string>
RoleId string
RoleName string
Description string
Effect string
Id string

The provider-assigned unique ID for this managed resource.

Policies []string
Resources []string
RoleId string
RoleName string
description String
effect String
id String

The provider-assigned unique ID for this managed resource.

policies List<String>
resources List<String>
roleId String
roleName String
description string
effect string
id string

The provider-assigned unique ID for this managed resource.

policies string[]
resources string[]
roleId string
roleName string
description str
effect str
id str

The provider-assigned unique ID for this managed resource.

policies Sequence[str]
resources Sequence[str]
role_id str
role_name str
description String
effect String
id String

The provider-assigned unique ID for this managed resource.

policies List<String>
resources List<String>
roleId String
roleName String

Package Details

Repository
astra pulumiverse/pulumi-astra
License
Apache-2.0
Notes

This Pulumi package is based on the astra Terraform Provider.