Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse
astra.getRole
Explore with Pulumi AI
astra.Role provides a datasource that lists the custom roles for an org.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Astra = Pulumi.Astra;
return await Deployment.RunAsync(() => 
{
    var dev = Astra.GetRole.Invoke(new()
    {
        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.LookupRole(ctx, &GetRoleArgs{
			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.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 dev = AstraFunctions.getRole(GetRoleArgs.builder()
            .roleId("role-id-here")
            .build());
    }
}
import pulumi
import pulumi_astra as astra
dev = astra.get_role(role_id="role-id-here")
import * as pulumi from "@pulumi/pulumi";
import * as astra from "@pulumi/astra";
const dev = pulumi.output(astra.getRole({
    roleId: "role-id-here",
}));
variables:
  dev:
    Fn::Invoke:
      Function: astra:getRole
      Arguments:
        roleId: role-id-here
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(role_id: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetRoleResult
def get_role_output(role_id: 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: astra:index/getRole:getRole
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Role
Id string - Role ID, system generated
 
- Role
Id string - Role ID, system generated
 
- role
Id String - Role ID, system generated
 
- role
Id string - Role ID, system generated
 
- role_
id str - Role ID, system generated
 
- role
Id String - Role ID, system generated
 
getRole Result
The following output properties are available:
- Description string
 - Role description
 - Effect string
 - Role effect
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Policies List<string>
 - List of policies for the role. See https://docs.datastax.com/en/astra/docs/user-permissions.html#operationalroles_detail for supported policies.
 - Resources List<string>
 - Resources for which role is applicable (format is "drn:astra:org:\n\n", followed by optional resource criteria. See example usage above).
 - Role
Id string - Role ID, system generated
 - Role
Name string - Role name
 
- Description string
 - Role description
 - Effect string
 - Role effect
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Policies []string
 - List of policies for the role. See https://docs.datastax.com/en/astra/docs/user-permissions.html#operationalroles_detail for supported policies.
 - Resources []string
 - Resources for which role is applicable (format is "drn:astra:org:\n\n", followed by optional resource criteria. See example usage above).
 - Role
Id string - Role ID, system generated
 - Role
Name string - Role name
 
- description String
 - Role description
 - effect String
 - Role effect
 - id String
 - The provider-assigned unique ID for this managed resource.
 - policies List<String>
 - List of policies for the role. See https://docs.datastax.com/en/astra/docs/user-permissions.html#operationalroles_detail for supported policies.
 - resources List<String>
 - Resources for which role is applicable (format is "drn:astra:org:\n\n", followed by optional resource criteria. See example usage above).
 - role
Id String - Role ID, system generated
 - role
Name String - Role name
 
- description string
 - Role description
 - effect string
 - Role effect
 - id string
 - The provider-assigned unique ID for this managed resource.
 - policies string[]
 - List of policies for the role. See https://docs.datastax.com/en/astra/docs/user-permissions.html#operationalroles_detail for supported policies.
 - resources string[]
 - Resources for which role is applicable (format is "drn:astra:org:\n\n", followed by optional resource criteria. See example usage above).
 - role
Id string - Role ID, system generated
 - role
Name string - Role name
 
- description str
 - Role description
 - effect str
 - Role effect
 - id str
 - The provider-assigned unique ID for this managed resource.
 - policies Sequence[str]
 - List of policies for the role. See https://docs.datastax.com/en/astra/docs/user-permissions.html#operationalroles_detail for supported policies.
 - resources Sequence[str]
 - Resources for which role is applicable (format is "drn:astra:org:\n\n", followed by optional resource criteria. See example usage above).
 - role_
id str - Role ID, system generated
 - role_
name str - Role name
 
- description String
 - Role description
 - effect String
 - Role effect
 - id String
 - The provider-assigned unique ID for this managed resource.
 - policies List<String>
 - List of policies for the role. See https://docs.datastax.com/en/astra/docs/user-permissions.html#operationalroles_detail for supported policies.
 - resources List<String>
 - Resources for which role is applicable (format is "drn:astra:org:\n\n", followed by optional resource criteria. See example usage above).
 - role
Id String - Role ID, system generated
 - role
Name String - Role name
 
Package Details
- Repository
 - astra pulumiverse/pulumi-astra
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
astraTerraform Provider.