1. Packages
  2. Tailscale
  3. API Docs
  4. getUsers
Tailscale v0.17.1 published on Monday, Sep 23, 2024 by Pulumi

tailscale.getUsers

Explore with Pulumi AI

tailscale logo
Tailscale v0.17.1 published on Monday, Sep 23, 2024 by Pulumi

    The users data source describes a list of users in a tailnet

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tailscale from "@pulumi/tailscale";
    
    const all-users = tailscale.getUsers({});
    
    import pulumi
    import pulumi_tailscale as tailscale
    
    all_users = tailscale.get_users()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-tailscale/sdk/go/tailscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tailscale.GetUsers(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tailscale = Pulumi.Tailscale;
    
    return await Deployment.RunAsync(() => 
    {
        var all_users = Tailscale.GetUsers.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tailscale.TailscaleFunctions;
    import com.pulumi.tailscale.inputs.GetUsersArgs;
    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 all-users = TailscaleFunctions.getUsers();
    
        }
    }
    
    variables:
      all-users:
        fn::invoke:
          Function: tailscale:getUsers
          Arguments: {}
    

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

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

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

    The following arguments are supported:

    Role string
    Filters the users list to elements whose role is the provided value.
    Type string
    Filters the users list to elements whose type is the provided value.
    Role string
    Filters the users list to elements whose role is the provided value.
    Type string
    Filters the users list to elements whose type is the provided value.
    role String
    Filters the users list to elements whose role is the provided value.
    type String
    Filters the users list to elements whose type is the provided value.
    role string
    Filters the users list to elements whose role is the provided value.
    type string
    Filters the users list to elements whose type is the provided value.
    role str
    Filters the users list to elements whose role is the provided value.
    type str
    Filters the users list to elements whose type is the provided value.
    role String
    Filters the users list to elements whose role is the provided value.
    type String
    Filters the users list to elements whose type is the provided value.

    getUsers Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Users List<GetUsersUser>
    The list of users in the tailnet
    Role string
    Filters the users list to elements whose role is the provided value.
    Type string
    Filters the users list to elements whose type is the provided value.
    Id string
    The provider-assigned unique ID for this managed resource.
    Users []GetUsersUser
    The list of users in the tailnet
    Role string
    Filters the users list to elements whose role is the provided value.
    Type string
    Filters the users list to elements whose type is the provided value.
    id String
    The provider-assigned unique ID for this managed resource.
    users List<GetUsersUser>
    The list of users in the tailnet
    role String
    Filters the users list to elements whose role is the provided value.
    type String
    Filters the users list to elements whose type is the provided value.
    id string
    The provider-assigned unique ID for this managed resource.
    users GetUsersUser[]
    The list of users in the tailnet
    role string
    Filters the users list to elements whose role is the provided value.
    type string
    Filters the users list to elements whose type is the provided value.
    id str
    The provider-assigned unique ID for this managed resource.
    users Sequence[GetUsersUser]
    The list of users in the tailnet
    role str
    Filters the users list to elements whose role is the provided value.
    type str
    Filters the users list to elements whose type is the provided value.
    id String
    The provider-assigned unique ID for this managed resource.
    users List<Property Map>
    The list of users in the tailnet
    role String
    Filters the users list to elements whose role is the provided value.
    type String
    Filters the users list to elements whose type is the provided value.

    Supporting Types

    GetUsersUser

    Created string
    The time the user joined their tailnet.
    CurrentlyConnected bool
    true when the user has a node currently connected to the control server.
    DeviceCount int
    Number of devices the user owns.
    DisplayName string
    The name of the user.
    Id string
    The unique identifier for the user.
    LastSeen string
    The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
    LoginName string
    The emailish login name of the user.
    ProfilePicUrl string
    The profile pic URL for the user.
    Role string
    The role of the user.
    Status string
    The status of the user.
    TailnetId string
    The tailnet that owns the user.
    Type string
    The type of relation this user has to the tailnet associated with the request.
    Created string
    The time the user joined their tailnet.
    CurrentlyConnected bool
    true when the user has a node currently connected to the control server.
    DeviceCount int
    Number of devices the user owns.
    DisplayName string
    The name of the user.
    Id string
    The unique identifier for the user.
    LastSeen string
    The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
    LoginName string
    The emailish login name of the user.
    ProfilePicUrl string
    The profile pic URL for the user.
    Role string
    The role of the user.
    Status string
    The status of the user.
    TailnetId string
    The tailnet that owns the user.
    Type string
    The type of relation this user has to the tailnet associated with the request.
    created String
    The time the user joined their tailnet.
    currentlyConnected Boolean
    true when the user has a node currently connected to the control server.
    deviceCount Integer
    Number of devices the user owns.
    displayName String
    The name of the user.
    id String
    The unique identifier for the user.
    lastSeen String
    The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
    loginName String
    The emailish login name of the user.
    profilePicUrl String
    The profile pic URL for the user.
    role String
    The role of the user.
    status String
    The status of the user.
    tailnetId String
    The tailnet that owns the user.
    type String
    The type of relation this user has to the tailnet associated with the request.
    created string
    The time the user joined their tailnet.
    currentlyConnected boolean
    true when the user has a node currently connected to the control server.
    deviceCount number
    Number of devices the user owns.
    displayName string
    The name of the user.
    id string
    The unique identifier for the user.
    lastSeen string
    The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
    loginName string
    The emailish login name of the user.
    profilePicUrl string
    The profile pic URL for the user.
    role string
    The role of the user.
    status string
    The status of the user.
    tailnetId string
    The tailnet that owns the user.
    type string
    The type of relation this user has to the tailnet associated with the request.
    created str
    The time the user joined their tailnet.
    currently_connected bool
    true when the user has a node currently connected to the control server.
    device_count int
    Number of devices the user owns.
    display_name str
    The name of the user.
    id str
    The unique identifier for the user.
    last_seen str
    The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
    login_name str
    The emailish login name of the user.
    profile_pic_url str
    The profile pic URL for the user.
    role str
    The role of the user.
    status str
    The status of the user.
    tailnet_id str
    The tailnet that owns the user.
    type str
    The type of relation this user has to the tailnet associated with the request.
    created String
    The time the user joined their tailnet.
    currentlyConnected Boolean
    true when the user has a node currently connected to the control server.
    deviceCount Number
    Number of devices the user owns.
    displayName String
    The name of the user.
    id String
    The unique identifier for the user.
    lastSeen String
    The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
    loginName String
    The emailish login name of the user.
    profilePicUrl String
    The profile pic URL for the user.
    role String
    The role of the user.
    status String
    The status of the user.
    tailnetId String
    The tailnet that owns the user.
    type String
    The type of relation this user has to the tailnet associated with the request.

    Package Details

    Repository
    tailscale pulumi/pulumi-tailscale
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the tailscale Terraform Provider.
    tailscale logo
    Tailscale v0.17.1 published on Monday, Sep 23, 2024 by Pulumi