

scaleway.getIamUser
Use this data source to get information on an existing IAM user based on its ID or email address. For more information, see the documentation.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() =>
{
var findById = Scaleway.GetIamUser.Invoke(new()
{
UserId = "11111111-1111-1111-1111-111111111111",
});
var findByEmail = Scaleway.GetIamUser.Invoke(new()
{
Email = "foo@bar.com",
});
});
package main
import (
"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err = scaleway.GetIamUser(ctx, &scaleway.GetIamUserArgs{
UserId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
}, nil)
if err != nil {
return err
}
_, err = scaleway.GetIamUser(ctx, &scaleway.GetIamUserArgs{
Email: pulumi.StringRef("foo@bar.com"),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetIamUserArgs;
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 findById = ScalewayFunctions.getIamUser(GetIamUserArgs.builder()
.userId("11111111-1111-1111-1111-111111111111")
.build());
final var findByEmail = ScalewayFunctions.getIamUser(GetIamUserArgs.builder()
.email("foo@bar.com")
.build());
}
}
import pulumi
import pulumi_scaleway as scaleway
find_by_id = scaleway.get_iam_user(user_id="11111111-1111-1111-1111-111111111111")
find_by_email = scaleway.get_iam_user(email="foo@bar.com")
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
const findById = scaleway.getIamUser({
userId: "11111111-1111-1111-1111-111111111111",
});
const findByEmail = scaleway.getIamUser({
email: "foo@bar.com",
});
variables:
findById:
fn::invoke:
Function: scaleway:getIamUser
Arguments:
userId: 11111111-1111-1111-1111-111111111111
findByEmail:
fn::invoke:
Function: scaleway:getIamUser
Arguments:
email: foo@bar.com
Using getIamUser
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 getIamUser(args: GetIamUserArgs, opts?: InvokeOptions): Promise<GetIamUserResult>
function getIamUserOutput(args: GetIamUserOutputArgs, opts?: InvokeOptions): Output<GetIamUserResult>
def get_iam_user(email: Optional[str] = None,
organization_id: Optional[str] = None,
user_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamUserResult
def get_iam_user_output(email: Optional[pulumi.Input[str]] = None,
organization_id: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamUserResult]
func GetIamUser(ctx *Context, args *GetIamUserArgs, opts ...InvokeOption) (*GetIamUserResult, error)
func GetIamUserOutput(ctx *Context, args *GetIamUserOutputArgs, opts ...InvokeOption) GetIamUserResultOutput
> Note: This function is named GetIamUser
in the Go SDK.
public static class GetIamUser
{
public static Task<GetIamUserResult> InvokeAsync(GetIamUserArgs args, InvokeOptions? opts = null)
public static Output<GetIamUserResult> Invoke(GetIamUserInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIamUserResult> getIamUser(GetIamUserArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: scaleway:index/getIamUser:getIamUser
arguments:
# arguments dictionary
The following arguments are supported:
- Email string
The email address of the IAM user. Only one of the
email
anduser_id
should be specified.- Organization
Id string organization_id
) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide theorganization_id
in the datasource.- User
Id string The ID of the IAM user. Only one of the
email
anduser_id
should be specified.
- Email string
The email address of the IAM user. Only one of the
email
anduser_id
should be specified.- Organization
Id string organization_id
) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide theorganization_id
in the datasource.- User
Id string The ID of the IAM user. Only one of the
email
anduser_id
should be specified.
- email String
The email address of the IAM user. Only one of the
email
anduser_id
should be specified.- organization
Id String organization_id
) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide theorganization_id
in the datasource.- user
Id String The ID of the IAM user. Only one of the
email
anduser_id
should be specified.
- email string
The email address of the IAM user. Only one of the
email
anduser_id
should be specified.- organization
Id string organization_id
) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide theorganization_id
in the datasource.- user
Id string The ID of the IAM user. Only one of the
email
anduser_id
should be specified.
- email str
The email address of the IAM user. Only one of the
email
anduser_id
should be specified.- organization_
id str organization_id
) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide theorganization_id
in the datasource.- user_
id str The ID of the IAM user. Only one of the
email
anduser_id
should be specified.
- email String
The email address of the IAM user. Only one of the
email
anduser_id
should be specified.- organization
Id String organization_id
) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide theorganization_id
in the datasource.- user
Id String The ID of the IAM user. Only one of the
email
anduser_id
should be specified.
getIamUser Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Email string
- Organization
Id string - User
Id string
- Id string
The provider-assigned unique ID for this managed resource.
- Email string
- Organization
Id string - User
Id string
- id String
The provider-assigned unique ID for this managed resource.
- email String
- organization
Id String - user
Id String
- id string
The provider-assigned unique ID for this managed resource.
- email string
- organization
Id string - user
Id string
- id str
The provider-assigned unique ID for this managed resource.
- email str
- organization_
id str - user_
id str
- id String
The provider-assigned unique ID for this managed resource.
- email String
- organization
Id String - user
Id String
Package Details
- Repository
- scaleway lbrlabs/pulumi-scaleway
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
scaleway
Terraform Provider.