User class

This resource manages a User resource within an Identity Store.

> Note: If you use an external identity provider or Active Directory as your identity source, use this resource with caution. IAM Identity Center does not support outbound synchronization, so your identity source does not automatically update with the changes that you make to users using this resource.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.identitystore.User("example", {
    name: {
        givenName: "John",
        familyName: "Doe",
    },
    emails: {
        value: "john@example.com",
    },
    identityStoreId: exampleAwsSsoadminInstances.identityStoreIds[0],
    displayName: "John Doe",
    userName: "johndoe",
});
import pulumi
import pulumi_aws as aws

example = aws.identitystore.User("example",
    name={
        "given_name": "John",
        "family_name": "Doe",
    },
    emails={
        "value": "john@example.com",
    },
    identity_store_id=example_aws_ssoadmin_instances["identityStoreIds"][0],
    display_name="John Doe",
    user_name="johndoe")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.IdentityStore.User("example", new()
    {
        Name = new Aws.IdentityStore.Inputs.UserNameArgs
        {
            GivenName = "John",
            FamilyName = "Doe",
        },
        Emails = new Aws.IdentityStore.Inputs.UserEmailsArgs
        {
            Value = "john@example.com",
        },
        IdentityStoreId = exampleAwsSsoadminInstances.IdentityStoreIds[0],
        DisplayName = "John Doe",
        UserName = "johndoe",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/identitystore"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identitystore.NewUser(ctx, "example", &identitystore.UserArgs{
			Name: &identitystore.UserNameArgs{
				GivenName:  pulumi.String("John"),
				FamilyName: pulumi.String("Doe"),
			},
			Emails: &identitystore.UserEmailsArgs{
				Value: pulumi.String("john@example.com"),
			},
			IdentityStoreId: pulumi.Any(exampleAwsSsoadminInstances.IdentityStoreIds[0]),
			DisplayName:     pulumi.String("John Doe"),
			UserName:        pulumi.String("johndoe"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_identitystore_user" "example" {
  name = {
    given_name  = "John"
    family_name = "Doe"
  }
  emails = {
    value = "john@example.com"
  }
  identity_store_id = exampleAwsSsoadminInstances.identityStoreIds[0]
  display_name      = "John Doe"
  user_name         = "johndoe"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.identitystore.User;
import com.pulumi.aws.identitystore.UserArgs;
import com.pulumi.aws.identitystore.inputs.UserNameArgs;
import com.pulumi.aws.identitystore.inputs.UserEmailsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
        var example = new User("example", UserArgs.builder()
            .name(UserNameArgs.builder()
                .givenName("John")
                .familyName("Doe")
                .build())
            .emails(UserEmailsArgs.builder()
                .value("john@example.com")
                .build())
            .identityStoreId(exampleAwsSsoadminInstances.identityStoreIds()[0])
            .displayName("John Doe")
            .userName("johndoe")
            .build());

    }
}
resources:
  example:
    type: aws:identitystore:User
    properties:
      name:
        givenName: John
        familyName: Doe
      emails:
        value: john@example.com
      identityStoreId: ${exampleAwsSsoadminInstances.identityStoreIds[0]}
      displayName: John Doe
      userName: johndoe

Import

Using pulumi import, import an Identity Store User using the combination identity_store_id/user_id. For example:

$ pulumi import aws:identitystore/user:User example d-9c6705e95c/065212b4-9061-703b-5876-13a517ae2a7c

Constructors

User(String name, {UserArgs? args, CustomResourceOptions? options})
Creates a new User. name The Pulumi resource name. args Arguments used to configure this User. The set of arguments for User. options Resource options controlling this resource's behavior.
User.reference(String urn)
Creates a typed reference to an existing User resource.

Properties

addresses ↔ Output<UserAddresses?>
Details about the user's address. At most 1 address is allowed. Detailed below.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
displayName ↔ Output<String>
The name that is typically displayed when the user is referenced.
latefinal
emails ↔ Output<UserEmails?>
Details about the user's email. At most 1 email is allowed. Detailed below.
latefinal
externalIds ↔ Output<List<UserExternalId>>
A list of identifiers issued to this resource by an external identity provider.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
identityStoreId ↔ Output<String>
The globally unique identifier for the identity store that this user is in.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
locale ↔ Output<String?>
The user's geographical region or location.
latefinal
name ↔ Output<UserName>
Details about the user's full name. Detailed below.
latefinal
nickname ↔ Output<String?>
An alternate name for the user.
latefinal
phoneNumbers ↔ Output<UserPhoneNumbers?>
Details about the user's phone number. At most 1 phone number is allowed. Detailed below.
latefinal
preferredLanguage ↔ Output<String?>
The preferred language of the user.
latefinal
profileUrl ↔ Output<String?>
An URL that may be associated with the user.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timezone ↔ Output<String?>
The user's time zone.
latefinal
title ↔ Output<String?>
The user's title.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
userId ↔ Output<String>
The identifier for this user in the identity store.
latefinal
userName ↔ Output<String>
A unique string used to identify the user. This value can consist of letters, accented characters, symbols, numbers, and punctuation. This value is specified at the time the user is created and stored as an attribute of the user object in the identity store. The limit is 128 characters.
latefinal
userStatus ↔ Output<String>
The current status of the user account.
latefinal
userType ↔ Output<String?>
The user type.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {UserState? state, CustomResourceOptions? options}) → User
Gets an existing User resource's state with the given name and id.