scaleway.getIamUser
Explore with Pulumi AI
Use this data source to get information on an existing IAM user based on its ID or email address. For more information refer to the IAM API documentation.
Example Usage
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",
});
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")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.LookupIamUser(ctx, &scaleway.LookupIamUserArgs{
UserId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
}, nil)
if err != nil {
return err
}
_, err = scaleway.LookupIamUser(ctx, &scaleway.LookupIamUserArgs{
Email: pulumi.StringRef("foo@bar.com"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
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 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());
}
}
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 LookupIamUser(ctx *Context, args *LookupIamUserArgs, opts ...InvokeOption) (*LookupIamUserResult, error)
func LookupIamUserOutput(ctx *Context, args *LookupIamUserOutputArgs, opts ...InvokeOption) LookupIamUserResultOutput
> Note: This function is named LookupIamUser
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.
- Organization
Id string organization_id
) The ID of the organization the user is associated with.- User
Id string The ID of the IAM user.
Note You must specify at least one:
name
and/oruser_id
.
- Email string
- The email address of the IAM user.
- Organization
Id string organization_id
) The ID of the organization the user is associated with.- User
Id string The ID of the IAM user.
Note You must specify at least one:
name
and/oruser_id
.
- email String
- The email address of the IAM user.
- organization
Id String organization_id
) The ID of the organization the user is associated with.- user
Id String The ID of the IAM user.
Note You must specify at least one:
name
and/oruser_id
.
- email string
- The email address of the IAM user.
- organization
Id string organization_id
) The ID of the organization the user is associated with.- user
Id string The ID of the IAM user.
Note You must specify at least one:
name
and/oruser_id
.
- email str
- The email address of the IAM user.
- organization_
id str organization_id
) The ID of the organization the user is associated with.- user_
id str The ID of the IAM user.
Note You must specify at least one:
name
and/oruser_id
.
- email String
- The email address of the IAM user.
- organization
Id String organization_id
) The ID of the organization the user is associated with.- user
Id String The ID of the IAM user.
Note You must specify at least one:
name
and/oruser_id
.
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 pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.