1. Packages
  2. Aquasec
  3. API Docs
  4. getRoles
Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse

aquasec.getRoles

Explore with Pulumi AI

aquasec logo
Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse

    The data source aquasec.getRoles provides a method to query all roles within the Aqua account managementrole database. The fields returned from this query are detailed in the Schema section below.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aquasec from "@pulumi/aquasec";
    
    const roles = aquasec.getRoles({});
    export const firstUserName = roles.then(roles => roles.roles?.[0]);
    
    import pulumi
    import pulumi_aquasec as aquasec
    
    roles = aquasec.get_roles()
    pulumi.export("firstUserName", roles.roles[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-aquasec/sdk/go/aquasec"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		roles, err := aquasec.GetRoles(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstUserName", roles.Roles[0])
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aquasec = Pulumi.Aquasec;
    
    return await Deployment.RunAsync(() => 
    {
        var roles = Aquasec.GetRoles.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["firstUserName"] = roles.Apply(getRolesResult => getRolesResult.Roles[0]),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aquasec.AquasecFunctions;
    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 roles = AquasecFunctions.getRoles();
    
            ctx.export("firstUserName", roles.applyValue(getRolesResult -> getRolesResult.roles()[0]));
        }
    }
    
    variables:
      roles:
        fn::invoke:
          Function: aquasec:getRoles
          Arguments: {}
    outputs:
      # Output the first role
      firstUserName: ${roles.roles[0]}
    

    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 GetRoles(ctx *Context, opts ...InvokeOption) (*GetRolesResult, error)
    func GetRolesOutput(ctx *Context, opts ...InvokeOption) GetRolesResultOutput

    > Note: This function is named GetRoles 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: aquasec: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.
    Roles List<Pulumiverse.Aquasec.Outputs.GetRolesRole>
    Id string
    The provider-assigned unique ID for this managed resource.
    Roles []GetRolesRole
    id String
    The provider-assigned unique ID for this managed resource.
    roles List<GetRolesRole>
    id string
    The provider-assigned unique ID for this managed resource.
    roles GetRolesRole[]
    id str
    The provider-assigned unique ID for this managed resource.
    roles Sequence[GetRolesRole]
    id String
    The provider-assigned unique ID for this managed resource.
    roles List<Property Map>

    Supporting Types

    GetRolesRole

    Description string
    Free text description for the role.
    Name string
    The name of the role, comprised of alphanumeric characters and '-', '_', ' ', ':', '.', '@', '!', '^'.
    Permission string
    The name of the Permission Set that will affect the users assigned to this specific Role.
    Scopes List<string>
    List of Application Scopes that will affect the users assigned to this specific Role.
    UpdatedAt string
    The date of the last modification of the role.
    Description string
    Free text description for the role.
    Name string
    The name of the role, comprised of alphanumeric characters and '-', '_', ' ', ':', '.', '@', '!', '^'.
    Permission string
    The name of the Permission Set that will affect the users assigned to this specific Role.
    Scopes []string
    List of Application Scopes that will affect the users assigned to this specific Role.
    UpdatedAt string
    The date of the last modification of the role.
    description String
    Free text description for the role.
    name String
    The name of the role, comprised of alphanumeric characters and '-', '_', ' ', ':', '.', '@', '!', '^'.
    permission String
    The name of the Permission Set that will affect the users assigned to this specific Role.
    scopes List<String>
    List of Application Scopes that will affect the users assigned to this specific Role.
    updatedAt String
    The date of the last modification of the role.
    description string
    Free text description for the role.
    name string
    The name of the role, comprised of alphanumeric characters and '-', '_', ' ', ':', '.', '@', '!', '^'.
    permission string
    The name of the Permission Set that will affect the users assigned to this specific Role.
    scopes string[]
    List of Application Scopes that will affect the users assigned to this specific Role.
    updatedAt string
    The date of the last modification of the role.
    description str
    Free text description for the role.
    name str
    The name of the role, comprised of alphanumeric characters and '-', '_', ' ', ':', '.', '@', '!', '^'.
    permission str
    The name of the Permission Set that will affect the users assigned to this specific Role.
    scopes Sequence[str]
    List of Application Scopes that will affect the users assigned to this specific Role.
    updated_at str
    The date of the last modification of the role.
    description String
    Free text description for the role.
    name String
    The name of the role, comprised of alphanumeric characters and '-', '_', ' ', ':', '.', '@', '!', '^'.
    permission String
    The name of the Permission Set that will affect the users assigned to this specific Role.
    scopes List<String>
    List of Application Scopes that will affect the users assigned to this specific Role.
    updatedAt String
    The date of the last modification of the role.

    Package Details

    Repository
    aquasec pulumiverse/pulumi-aquasec
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aquasec Terraform Provider.
    aquasec logo
    Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse