scaleway logo
Scaleway v1.6.0, Dec 17 22

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 and user_id should be specified.

OrganizationId string

organization_id) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide the organization_id in the datasource.

UserId string

The ID of the IAM user. Only one of the email and user_id should be specified.

Email string

The email address of the IAM user. Only one of the email and user_id should be specified.

OrganizationId string

organization_id) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide the organization_id in the datasource.

UserId string

The ID of the IAM user. Only one of the email and user_id should be specified.

email String

The email address of the IAM user. Only one of the email and user_id should be specified.

organizationId String

organization_id) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide the organization_id in the datasource.

userId String

The ID of the IAM user. Only one of the email and user_id should be specified.

email string

The email address of the IAM user. Only one of the email and user_id should be specified.

organizationId string

organization_id) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide the organization_id in the datasource.

userId string

The ID of the IAM user. Only one of the email and user_id should be specified.

email str

The email address of the IAM user. Only one of the email and user_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 the organization_id in the datasource.

user_id str

The ID of the IAM user. Only one of the email and user_id should be specified.

email String

The email address of the IAM user. Only one of the email and user_id should be specified.

organizationId String

organization_id) The ID of the organization the user is associated with. For now, it is necessary to explicitly provide the organization_id in the datasource.

userId String

The ID of the IAM user. Only one of the email and user_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
OrganizationId string
UserId string
Id string

The provider-assigned unique ID for this managed resource.

Email string
OrganizationId string
UserId string
id String

The provider-assigned unique ID for this managed resource.

email String
organizationId String
userId String
id string

The provider-assigned unique ID for this managed resource.

email string
organizationId string
userId 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
organizationId String
userId String

Package Details

Repository
scaleway lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.