ionoscloud.getUser
Explore with Pulumi AI
The User data source can be used to search for and return existing users. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.
Example Usage
By ID
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getUser({
id: "user_id",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_user(id="user_id")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupUser(ctx, &ionoscloud.LookupUserArgs{
Id: pulumi.StringRef("user_id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetUser.Invoke(new()
{
Id = "user_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.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 = IonoscloudFunctions.getUser(GetUserArgs.builder()
.id("user_id")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getUser
arguments:
id: user_id
By Email
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getUser({
email: "example@email.com",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_user(email="example@email.com")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupUser(ctx, &ionoscloud.LookupUserArgs{
Email: pulumi.StringRef("example@email.com"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetUser.Invoke(new()
{
Email = "example@email.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.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 = IonoscloudFunctions.getUser(GetUserArgs.builder()
.email("example@email.com")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getUser
arguments:
email: example@email.com
By Email from Env Variables - Current User
data “ionoscloud.User” “example” { }
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(email: Optional[str] = None,
id: Optional[str] = None,
timeouts: Optional[GetUserTimeouts] = None,
opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(email: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
timeouts: Optional[pulumi.Input[GetUserTimeoutsArgs]] = 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: ionoscloud:index/getUser:getUser
arguments:
# arguments dictionary
The following arguments are supported:
- Email string
- Email of an existing user that you want to search for.
- Id string
ID of the user you want to search for.
Either
email
orid
can be provided. If no argument is set, the provider will search for the email that was provided for the configuration. If none is found, the provider will return an error.- Timeouts
Get
User Timeouts
- Email string
- Email of an existing user that you want to search for.
- Id string
ID of the user you want to search for.
Either
email
orid
can be provided. If no argument is set, the provider will search for the email that was provided for the configuration. If none is found, the provider will return an error.- Timeouts
Get
User Timeouts
- email String
- Email of an existing user that you want to search for.
- id String
ID of the user you want to search for.
Either
email
orid
can be provided. If no argument is set, the provider will search for the email that was provided for the configuration. If none is found, the provider will return an error.- timeouts
Get
User Timeouts
- email string
- Email of an existing user that you want to search for.
- id string
ID of the user you want to search for.
Either
email
orid
can be provided. If no argument is set, the provider will search for the email that was provided for the configuration. If none is found, the provider will return an error.- timeouts
Get
User Timeouts
- email str
- Email of an existing user that you want to search for.
- id str
ID of the user you want to search for.
Either
email
orid
can be provided. If no argument is set, the provider will search for the email that was provided for the configuration. If none is found, the provider will return an error.- timeouts
Get
User Timeouts
- email String
- Email of an existing user that you want to search for.
- id String
ID of the user you want to search for.
Either
email
orid
can be provided. If no argument is set, the provider will search for the email that was provided for the configuration. If none is found, the provider will return an error.- timeouts Property Map
getUser Result
The following output properties are available:
- Active bool
- Indicates if the user is active
- Administrator bool
- Indicates if the user has administrative rights. Administrators do not need to be managed in groups, as they automatically have access to all resources associated with the contract.
- First
Name string - The first name for the user.
- Force
Sec boolAuth - Indicates if secure (two-factor) authentication should be forced for the user (true) or not (false).
- Groups
List<Get
User Group> - Shows the id and name of the groups that the user is a member of
- Id string
- The id of the user.
- Last
Name string - The last name for the user.
- S3Canonical
User stringId - Canonical (S3) id of the user for a given identity
- Sec
Auth boolActive - Indicates if secure authentication is active for the user or not
- Email string
- The e-mail address for the user.
- Timeouts
Get
User Timeouts
- Active bool
- Indicates if the user is active
- Administrator bool
- Indicates if the user has administrative rights. Administrators do not need to be managed in groups, as they automatically have access to all resources associated with the contract.
- First
Name string - The first name for the user.
- Force
Sec boolAuth - Indicates if secure (two-factor) authentication should be forced for the user (true) or not (false).
- Groups
[]Get
User Group - Shows the id and name of the groups that the user is a member of
- Id string
- The id of the user.
- Last
Name string - The last name for the user.
- S3Canonical
User stringId - Canonical (S3) id of the user for a given identity
- Sec
Auth boolActive - Indicates if secure authentication is active for the user or not
- Email string
- The e-mail address for the user.
- Timeouts
Get
User Timeouts
- active Boolean
- Indicates if the user is active
- administrator Boolean
- Indicates if the user has administrative rights. Administrators do not need to be managed in groups, as they automatically have access to all resources associated with the contract.
- first
Name String - The first name for the user.
- force
Sec BooleanAuth - Indicates if secure (two-factor) authentication should be forced for the user (true) or not (false).
- groups
List<Get
User Group> - Shows the id and name of the groups that the user is a member of
- id String
- The id of the user.
- last
Name String - The last name for the user.
- s3Canonical
User StringId - Canonical (S3) id of the user for a given identity
- sec
Auth BooleanActive - Indicates if secure authentication is active for the user or not
- email String
- The e-mail address for the user.
- timeouts
Get
User Timeouts
- active boolean
- Indicates if the user is active
- administrator boolean
- Indicates if the user has administrative rights. Administrators do not need to be managed in groups, as they automatically have access to all resources associated with the contract.
- first
Name string - The first name for the user.
- force
Sec booleanAuth - Indicates if secure (two-factor) authentication should be forced for the user (true) or not (false).
- groups
Get
User Group[] - Shows the id and name of the groups that the user is a member of
- id string
- The id of the user.
- last
Name string - The last name for the user.
- s3Canonical
User stringId - Canonical (S3) id of the user for a given identity
- sec
Auth booleanActive - Indicates if secure authentication is active for the user or not
- email string
- The e-mail address for the user.
- timeouts
Get
User Timeouts
- active bool
- Indicates if the user is active
- administrator bool
- Indicates if the user has administrative rights. Administrators do not need to be managed in groups, as they automatically have access to all resources associated with the contract.
- first_
name str - The first name for the user.
- force_
sec_ boolauth - Indicates if secure (two-factor) authentication should be forced for the user (true) or not (false).
- groups
Sequence[Get
User Group] - Shows the id and name of the groups that the user is a member of
- id str
- The id of the user.
- last_
name str - The last name for the user.
- s3_
canonical_ struser_ id - Canonical (S3) id of the user for a given identity
- sec_
auth_ boolactive - Indicates if secure authentication is active for the user or not
- email str
- The e-mail address for the user.
- timeouts
Get
User Timeouts
- active Boolean
- Indicates if the user is active
- administrator Boolean
- Indicates if the user has administrative rights. Administrators do not need to be managed in groups, as they automatically have access to all resources associated with the contract.
- first
Name String - The first name for the user.
- force
Sec BooleanAuth - Indicates if secure (two-factor) authentication should be forced for the user (true) or not (false).
- groups List<Property Map>
- Shows the id and name of the groups that the user is a member of
- id String
- The id of the user.
- last
Name String - The last name for the user.
- s3Canonical
User StringId - Canonical (S3) id of the user for a given identity
- sec
Auth BooleanActive - Indicates if secure authentication is active for the user or not
- email String
- The e-mail address for the user.
- timeouts Property Map
Supporting Types
GetUserGroup
GetUserTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.