1. Packages
  2. Unifi
  3. API Docs
  4. iam
  5. getUser
Unifi v0.1.0 published on Monday, Oct 28, 2024 by Pulumiverse

unifi.iam.getUser

Explore with Pulumi AI

unifi logo
Unifi v0.1.0 published on Monday, Oct 28, 2024 by Pulumiverse

    unifi.iam.User retrieves properties of a user (or “client” in the UI) of the network by MAC address.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumi/unifi";
    
    const client = unifi.iam.getUser({
        mac: "01:23:45:67:89:ab",
    });
    
    import pulumi
    import pulumi_unifi as unifi
    
    client = unifi.iam.get_user(mac="01:23:45:67:89:ab")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/iam"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iam.LookupUser(ctx, &iam.LookupUserArgs{
    			Mac: "01:23:45:67:89:ab",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Unifi = Pulumi.Unifi;
    
    return await Deployment.RunAsync(() => 
    {
        var client = Unifi.IAM.GetUser.Invoke(new()
        {
            Mac = "01:23:45:67:89:ab",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.unifi.iam.IamFunctions;
    import com.pulumi.unifi.iam.inputs.GetUserArgs;
    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 client = IamFunctions.getUser(GetUserArgs.builder()
                .mac("01:23:45:67:89:ab")
                .build());
    
        }
    }
    
    variables:
      client:
        fn::invoke:
          Function: unifi:iam:getUser
          Arguments:
            mac: 01:23:45:67:89:ab
    

    Using getUser

    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 getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
    function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>
    def get_user(mac: Optional[str] = None,
                 site: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetUserResult
    def get_user_output(mac: Optional[pulumi.Input[str]] = None,
                 site: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
    func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
    func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput

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

    public static class GetUser 
    {
        public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
        public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: unifi:iam/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Mac string
    The MAC address of the user.
    Site string
    The name of the site the user is associated with.
    Mac string
    The MAC address of the user.
    Site string
    The name of the site the user is associated with.
    mac String
    The MAC address of the user.
    site String
    The name of the site the user is associated with.
    mac string
    The MAC address of the user.
    site string
    The name of the site the user is associated with.
    mac str
    The MAC address of the user.
    site str
    The name of the site the user is associated with.
    mac String
    The MAC address of the user.
    site String
    The name of the site the user is associated with.

    getUser Result

    The following output properties are available:

    Blocked bool
    Specifies whether this user should be blocked from the network.
    DevIdOverride int
    Override the device fingerprint.
    FixedIp string
    fixed IPv4 address set for this user.
    Hostname string
    The hostname of the user.
    Id string
    The ID of the user.
    Ip string
    The IP address of the user.
    LocalDnsRecord string
    The local DNS record for this user.
    Mac string
    The MAC address of the user.
    Name string
    The name of the user.
    NetworkId string
    The network ID for this user.
    Note string
    A note with additional information for the user.
    Site string
    The name of the site the user is associated with.
    UserGroupId string
    The user group ID for the user.
    Blocked bool
    Specifies whether this user should be blocked from the network.
    DevIdOverride int
    Override the device fingerprint.
    FixedIp string
    fixed IPv4 address set for this user.
    Hostname string
    The hostname of the user.
    Id string
    The ID of the user.
    Ip string
    The IP address of the user.
    LocalDnsRecord string
    The local DNS record for this user.
    Mac string
    The MAC address of the user.
    Name string
    The name of the user.
    NetworkId string
    The network ID for this user.
    Note string
    A note with additional information for the user.
    Site string
    The name of the site the user is associated with.
    UserGroupId string
    The user group ID for the user.
    blocked Boolean
    Specifies whether this user should be blocked from the network.
    devIdOverride Integer
    Override the device fingerprint.
    fixedIp String
    fixed IPv4 address set for this user.
    hostname String
    The hostname of the user.
    id String
    The ID of the user.
    ip String
    The IP address of the user.
    localDnsRecord String
    The local DNS record for this user.
    mac String
    The MAC address of the user.
    name String
    The name of the user.
    networkId String
    The network ID for this user.
    note String
    A note with additional information for the user.
    site String
    The name of the site the user is associated with.
    userGroupId String
    The user group ID for the user.
    blocked boolean
    Specifies whether this user should be blocked from the network.
    devIdOverride number
    Override the device fingerprint.
    fixedIp string
    fixed IPv4 address set for this user.
    hostname string
    The hostname of the user.
    id string
    The ID of the user.
    ip string
    The IP address of the user.
    localDnsRecord string
    The local DNS record for this user.
    mac string
    The MAC address of the user.
    name string
    The name of the user.
    networkId string
    The network ID for this user.
    note string
    A note with additional information for the user.
    site string
    The name of the site the user is associated with.
    userGroupId string
    The user group ID for the user.
    blocked bool
    Specifies whether this user should be blocked from the network.
    dev_id_override int
    Override the device fingerprint.
    fixed_ip str
    fixed IPv4 address set for this user.
    hostname str
    The hostname of the user.
    id str
    The ID of the user.
    ip str
    The IP address of the user.
    local_dns_record str
    The local DNS record for this user.
    mac str
    The MAC address of the user.
    name str
    The name of the user.
    network_id str
    The network ID for this user.
    note str
    A note with additional information for the user.
    site str
    The name of the site the user is associated with.
    user_group_id str
    The user group ID for the user.
    blocked Boolean
    Specifies whether this user should be blocked from the network.
    devIdOverride Number
    Override the device fingerprint.
    fixedIp String
    fixed IPv4 address set for this user.
    hostname String
    The hostname of the user.
    id String
    The ID of the user.
    ip String
    The IP address of the user.
    localDnsRecord String
    The local DNS record for this user.
    mac String
    The MAC address of the user.
    name String
    The name of the user.
    networkId String
    The network ID for this user.
    note String
    A note with additional information for the user.
    site String
    The name of the site the user is associated with.
    userGroupId String
    The user group ID for the user.

    Package Details

    Repository
    unifi pulumiverse/pulumi-unifi
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the unifi Terraform Provider.
    unifi logo
    Unifi v0.1.0 published on Monday, Oct 28, 2024 by Pulumiverse