Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien
vultr.getUser
Explore with Pulumi AI
Get information about a Vultr user associated with your account. This data source provides the name, email, access control list, and API status for a Vultr user associated with your account.
Example Usage
Get the information for a user by email
:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const myUser = vultr.getUser({
filters: [{
name: "email",
values: ["jdoe@example.com"],
}],
});
import pulumi
import pulumi_vultr as vultr
my_user = vultr.get_user(filters=[vultr.GetUserFilterArgs(
name="email",
values=["jdoe@example.com"],
)])
package main
import (
"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vultr.LookupUser(ctx, &vultr.LookupUserArgs{
Filters: []vultr.GetUserFilter{
{
Name: "email",
Values: []string{
"jdoe@example.com",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = Pulumi.Vultr;
return await Deployment.RunAsync(() =>
{
var myUser = Vultr.GetUser.Invoke(new()
{
Filters = new[]
{
new Vultr.Inputs.GetUserFilterInputArgs
{
Name = "email",
Values = new[]
{
"jdoe@example.com",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.VultrFunctions;
import com.pulumi.vultr.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 myUser = VultrFunctions.getUser(GetUserArgs.builder()
.filters(GetUserFilterArgs.builder()
.name("email")
.values("jdoe@example.com")
.build())
.build());
}
}
variables:
myUser:
fn::invoke:
Function: vultr:getUser
Arguments:
filters:
- name: email
values:
- jdoe@example.com
Get the information for a user by name
:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const myUser = vultr.getUser({
filters: [{
name: "name",
values: ["John Doe"],
}],
});
import pulumi
import pulumi_vultr as vultr
my_user = vultr.get_user(filters=[vultr.GetUserFilterArgs(
name="name",
values=["John Doe"],
)])
package main
import (
"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vultr.LookupUser(ctx, &vultr.LookupUserArgs{
Filters: []vultr.GetUserFilter{
{
Name: "name",
Values: []string{
"John Doe",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = Pulumi.Vultr;
return await Deployment.RunAsync(() =>
{
var myUser = Vultr.GetUser.Invoke(new()
{
Filters = new[]
{
new Vultr.Inputs.GetUserFilterInputArgs
{
Name = "name",
Values = new[]
{
"John Doe",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.VultrFunctions;
import com.pulumi.vultr.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 myUser = VultrFunctions.getUser(GetUserArgs.builder()
.filters(GetUserFilterArgs.builder()
.name("name")
.values("John Doe")
.build())
.build());
}
}
variables:
myUser:
fn::invoke:
Function: vultr:getUser
Arguments:
filters:
- name: name
values:
- John Doe
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(filters: Optional[Sequence[GetUserFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetUserFilterArgs]]]] = 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: vultr:index/getUser:getUser
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<ediri.
Vultr. Inputs. Get User Filter> - Query parameters for finding users.
- Filters
[]Get
User Filter - Query parameters for finding users.
- filters
List<Get
User Filter> - Query parameters for finding users.
- filters
Get
User Filter[] - Query parameters for finding users.
- filters
Sequence[Get
User Filter] - Query parameters for finding users.
- filters List<Property Map>
- Query parameters for finding users.
getUser Result
The following output properties are available:
- Acls List<string>
- The access control list for the user.
- Api
Enabled bool - Whether API is enabled for the user.
- Email string
- The email of the user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the user.
- Filters
List<ediri.
Vultr. Outputs. Get User Filter>
- Acls []string
- The access control list for the user.
- Api
Enabled bool - Whether API is enabled for the user.
- Email string
- The email of the user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the user.
- Filters
[]Get
User Filter
- acls List<String>
- The access control list for the user.
- api
Enabled Boolean - Whether API is enabled for the user.
- email String
- The email of the user.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the user.
- filters
List<Get
User Filter>
- acls string[]
- The access control list for the user.
- api
Enabled boolean - Whether API is enabled for the user.
- email string
- The email of the user.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the user.
- filters
Get
User Filter[]
- acls Sequence[str]
- The access control list for the user.
- api_
enabled bool - Whether API is enabled for the user.
- email str
- The email of the user.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the user.
- filters
Sequence[Get
User Filter]
- acls List<String>
- The access control list for the user.
- api
Enabled Boolean - Whether API is enabled for the user.
- email String
- The email of the user.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the user.
- filters List<Property Map>
Supporting Types
GetUserFilter
Package Details
- Repository
- vultr dirien/pulumi-vultr
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vultr
Terraform Provider.