1. Packages
  2. Mso Provider
  3. API Docs
  4. getUser
mso 1.4.0 published on Monday, Apr 14, 2025 by ciscodevnet

mso.getUser

Explore with Pulumi AI

mso logo
mso 1.4.0 published on Monday, Apr 14, 2025 by ciscodevnet

    Data source for MSO User.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mso from "@pulumi/mso";
    
    const example = mso.getUser({
        username: "name",
    });
    
    import pulumi
    import pulumi_mso as mso
    
    example = mso.get_user(username="name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/mso/mso"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mso.LookupUser(ctx, &mso.LookupUserArgs{
    			Username: "name",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mso = Pulumi.Mso;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Mso.GetUser.Invoke(new()
        {
            Username = "name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mso.MsoFunctions;
    import com.pulumi.mso.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 example = MsoFunctions.getUser(GetUserArgs.builder()
                .username("name")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: mso:getUser
          arguments:
            username: name
    

    Argument Reference

    • username - (Required) The username of the User.

    Attribute Reference

    • user_password - (Read-Only) The password of the User.
    • roles - Deprecated (Read-Only) The roles of the User. This attribute is deprecated on ND-based MSO/NDO.
      • roleid - (Read-Only) The role ID of the User.
      • access_type - (Read-Only) The acces type of the User.
    • user_rbac - (Read-Only) The roles of the User.
      • name - (Read-Only) The name of the role.
      • user_priv - (Read-Only) The privilege access of the User.
    • first_name - (Read-Only) The first name of the User.
    • last_name - (Read-Only) The last name of the User.
    • email - (Read-Only) The email of the User.
    • phone - (Read-Only) The phone of the User. This attribute is deprecated on ND-based MSO/NDO.
    • account-status - (Read-Only) The account status of the User.
    • domain - (Read-Only) The domain status of the User.

    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(id: Optional[str] = None,
                 username: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetUserResult
    def get_user_output(id: Optional[pulumi.Input[str]] = None,
                 username: 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)
    public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: mso:index/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Username string
    Id string
    Username string
    Id string
    username String
    id String
    username string
    id string
    username str
    id str
    username String
    id String

    getUser Result

    The following output properties are available:

    Supporting Types

    GetUserRole

    AccessType string
    Roleid string
    AccessType string
    Roleid string
    accessType String
    roleid String
    accessType string
    roleid string
    accessType String
    roleid String

    GetUserUserRbac

    Name string
    UserPriv string
    Name string
    UserPriv string
    name String
    userPriv String
    name string
    userPriv string
    name String
    userPriv String

    Package Details

    Repository
    mso ciscodevnet/terraform-provider-mso
    License
    Notes
    This Pulumi package is based on the mso Terraform Provider.
    mso logo
    mso 1.4.0 published on Monday, Apr 14, 2025 by ciscodevnet