1. Packages
  2. Aquasec
  3. API Docs
  4. getUsers
Aquasec v0.8.27 published on Monday, Jan 29, 2024 by Pulumiverse

aquasec.getUsers

Explore with Pulumi AI

aquasec logo
Aquasec v0.8.27 published on Monday, Jan 29, 2024 by Pulumiverse

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

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aquasec = Pulumi.Aquasec;
    
    return await Deployment.RunAsync(() => 
    {
        var users = Aquasec.GetUsers.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["firstUserName"] = users.Apply(getUsersResult => getUsersResult.Users[0]?.Name),
        };
    });
    
    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 {
    		users, err := aquasec.GetUsers(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstUserName", users.Users[0].Name)
    		return nil
    	})
    }
    
    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 users = AquasecFunctions.getUsers();
    
            ctx.export("firstUserName", users.applyValue(getUsersResult -> getUsersResult.users()[0].name()));
        }
    }
    
    import pulumi
    import pulumi_aquasec as aquasec
    
    users = aquasec.get_users()
    pulumi.export("firstUserName", users.users[0].name)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aquasec from "@pulumi/aquasec";
    
    const users = aquasec.getUsers({});
    export const firstUserName = users.then(users => users.users?.[0]?.name);
    
    variables:
      users:
        fn::invoke:
          Function: aquasec:getUsers
          Arguments: {}
    outputs:
      firstUserName: ${users.users[0].name}
    

    Using getUsers

    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 getUsers(opts?: InvokeOptions): Promise<GetUsersResult>
    function getUsersOutput(opts?: InvokeOptions): Output<GetUsersResult>
    def get_users(opts: Optional[InvokeOptions] = None) -> GetUsersResult
    def get_users_output(opts: Optional[InvokeOptions] = None) -> Output[GetUsersResult]
    func GetUsers(ctx *Context, opts ...InvokeOption) (*GetUsersResult, error)
    func GetUsersOutput(ctx *Context, opts ...InvokeOption) GetUsersResultOutput

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

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

    getUsers Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Users List<Pulumiverse.Aquasec.Outputs.GetUsersUser>
    Id string
    The provider-assigned unique ID for this managed resource.
    Users []GetUsersUser
    id String
    The provider-assigned unique ID for this managed resource.
    users List<GetUsersUser>
    id string
    The provider-assigned unique ID for this managed resource.
    users GetUsersUser[]
    id str
    The provider-assigned unique ID for this managed resource.
    users Sequence[GetUsersUser]
    id String
    The provider-assigned unique ID for this managed resource.
    users List<Property Map>

    Supporting Types

    GetUsersUser

    Email string
    FirstTime bool
    IsSuper bool
    Name string
    Plan string
    Role string
    Roles List<string>
    Type string
    UiAccess bool
    UserId string
    Email string
    FirstTime bool
    IsSuper bool
    Name string
    Plan string
    Role string
    Roles []string
    Type string
    UiAccess bool
    UserId string
    email String
    firstTime Boolean
    isSuper Boolean
    name String
    plan String
    role String
    roles List<String>
    type String
    uiAccess Boolean
    userId String
    email string
    firstTime boolean
    isSuper boolean
    name string
    plan string
    role string
    roles string[]
    type string
    uiAccess boolean
    userId string
    email str
    first_time bool
    is_super bool
    name str
    plan str
    role str
    roles Sequence[str]
    type str
    ui_access bool
    user_id str
    email String
    firstTime Boolean
    isSuper Boolean
    name String
    plan String
    role String
    roles List<String>
    type String
    uiAccess Boolean
    userId String

    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.27 published on Monday, Jan 29, 2024 by Pulumiverse