1. Packages
  2. Opennebula Provider
  3. API Docs
  4. getUser
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.getUser

Explore with Pulumi AI

opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

Use this data source to retrieve the user information for a given name.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as opennebula from "@pulumi/opennebula";

const example = opennebula.getUser({
    name: "John",
});
Copy
import pulumi
import pulumi_opennebula as opennebula

example = opennebula.get_user(name="John")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opennebula.LookupUser(ctx, &opennebula.LookupUserArgs{
			Name: pulumi.StringRef("John"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opennebula = Pulumi.Opennebula;

return await Deployment.RunAsync(() => 
{
    var example = Opennebula.GetUser.Invoke(new()
    {
        Name = "John",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opennebula.OpennebulaFunctions;
import com.pulumi.opennebula.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 = OpennebulaFunctions.getUser(GetUserArgs.builder()
            .name("John")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: opennebula:getUser
      arguments:
        name: John
Copy

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>
Copy
def get_user(groups: Optional[Sequence[float]] = None,
             id: Optional[float] = None,
             name: Optional[str] = None,
             primary_group: Optional[float] = None,
             tags: Optional[Mapping[str, str]] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(groups: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None,
             id: Optional[pulumi.Input[float]] = None,
             name: Optional[pulumi.Input[str]] = None,
             primary_group: Optional[pulumi.Input[float]] = None,
             tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
Copy
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: opennebula:index/getUser:getUser
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Groups List<double>
List of secondary groups ID of the user.
Id double
ID of the user.
Name string
The OpenNebula user to retrieve information for.
PrimaryGroup double
Primary group ID of the user.
Tags Dictionary<string, string>
Tags of the user (Key = Value).
Groups []float64
List of secondary groups ID of the user.
Id float64
ID of the user.
Name string
The OpenNebula user to retrieve information for.
PrimaryGroup float64
Primary group ID of the user.
Tags map[string]string
Tags of the user (Key = Value).
groups List<Double>
List of secondary groups ID of the user.
id Double
ID of the user.
name String
The OpenNebula user to retrieve information for.
primaryGroup Double
Primary group ID of the user.
tags Map<String,String>
Tags of the user (Key = Value).
groups number[]
List of secondary groups ID of the user.
id number
ID of the user.
name string
The OpenNebula user to retrieve information for.
primaryGroup number
Primary group ID of the user.
tags {[key: string]: string}
Tags of the user (Key = Value).
groups Sequence[float]
List of secondary groups ID of the user.
id float
ID of the user.
name str
The OpenNebula user to retrieve information for.
primary_group float
Primary group ID of the user.
tags Mapping[str, str]
Tags of the user (Key = Value).
groups List<Number>
List of secondary groups ID of the user.
id Number
ID of the user.
name String
The OpenNebula user to retrieve information for.
primaryGroup Number
Primary group ID of the user.
tags Map<String>
Tags of the user (Key = Value).

getUser Result

The following output properties are available:

Groups List<double>
List of secondary groups ID of the user.
Id double
ID of the user.
Name string
Name of the user.
PrimaryGroup double
Primary group ID of the user.
Tags Dictionary<string, string>
Tags of the user (Key = Value).
Groups []float64
List of secondary groups ID of the user.
Id float64
ID of the user.
Name string
Name of the user.
PrimaryGroup float64
Primary group ID of the user.
Tags map[string]string
Tags of the user (Key = Value).
groups List<Double>
List of secondary groups ID of the user.
id Double
ID of the user.
name String
Name of the user.
primaryGroup Double
Primary group ID of the user.
tags Map<String,String>
Tags of the user (Key = Value).
groups number[]
List of secondary groups ID of the user.
id number
ID of the user.
name string
Name of the user.
primaryGroup number
Primary group ID of the user.
tags {[key: string]: string}
Tags of the user (Key = Value).
groups Sequence[float]
List of secondary groups ID of the user.
id float
ID of the user.
name str
Name of the user.
primary_group float
Primary group ID of the user.
tags Mapping[str, str]
Tags of the user (Key = Value).
groups List<Number>
List of secondary groups ID of the user.
id Number
ID of the user.
name String
Name of the user.
primaryGroup Number
Primary group ID of the user.
tags Map<String>
Tags of the user (Key = Value).

Package Details

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