1. Packages
  2. Astra DB
  3. API Docs
  4. getRoles
Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse

astra.getRoles

Explore with Pulumi AI

astra logo
Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse

    astra.getRoles provides a datasource for a list of Astra roles. This can be used to select roles within your Astra Organization.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Astra = Pulumi.Astra;
    
    return await Deployment.RunAsync(() => 
    {
        var dev = Astra.GetRoles.Invoke();
    
    });
    
    package main
    
    import (
    	"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.LookupRoles(ctx, nil, 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 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();
    
        }
    }
    
    import pulumi
    import pulumi_astra as astra
    
    dev = astra.get_roles()
    
    import * as pulumi from "@pulumi/pulumi";
    import * as astra from "@pulumi/astra";
    
    const dev = pulumi.output(astra.getRoles());
    
    variables:
      dev:
        Fn::Invoke:
          Function: astra:getRoles
          Arguments: {}
    

    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(opts?: InvokeOptions): Promise<GetRolesResult>
    function getRolesOutput(opts?: InvokeOptions): Output<GetRolesResult>
    def get_roles(opts: Optional[InvokeOptions] = None) -> GetRolesResult
    def get_roles_output(opts: Optional[InvokeOptions] = None) -> Output[GetRolesResult]
    func LookupRoles(ctx *Context, opts ...InvokeOption) (*LookupRolesResult, error)
    func LookupRolesOutput(ctx *Context, opts ...InvokeOption) LookupRolesResultOutput

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

    public static class GetRoles 
    {
        public static Task<GetRolesResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetRolesResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRolesResult> getRoles(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: astra:index/getRoles:getRoles
      arguments:
        # arguments dictionary

    getRoles Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Results List<Pulumiverse.Astra.Outputs.GetRolesResult>
    The list of Astra roles.
    Id string
    The provider-assigned unique ID for this managed resource.
    Results []GetRolesResult
    The list of Astra roles.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<GetRolesResult>
    The list of Astra roles.
    id string
    The provider-assigned unique ID for this managed resource.
    results GetRolesResult[]
    The list of Astra roles.
    id str
    The provider-assigned unique ID for this managed resource.
    results Sequence[GetRolesResult]
    The list of Astra roles.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<Property Map>
    The list of Astra roles.

    Supporting Types

    GetRolesResult

    Description string
    Effect string
    Policies List<string>
    Resources List<string>
    RoleId string
    RoleName string
    Description string
    Effect string
    Policies []string
    Resources []string
    RoleId string
    RoleName string
    description String
    effect String
    policies List<String>
    resources List<String>
    roleId String
    roleName String
    description string
    effect string
    policies string[]
    resources string[]
    roleId string
    roleName string
    description str
    effect str
    policies Sequence[str]
    resources Sequence[str]
    role_id str
    role_name str
    description String
    effect String
    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.
    astra logo
    Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse