aws.identitystore.getUser
Explore with Pulumi AI
Use this data source to get an Identity Store User.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ssoadmin.getInstances({});
const exampleGetUser = example.then(example => aws.identitystore.getUser({
    identityStoreId: example.identityStoreIds?.[0],
    alternateIdentifier: {
        uniqueAttribute: {
            attributePath: "UserName",
            attributeValue: "ExampleUser",
        },
    },
}));
export const userId = exampleGetUser.then(exampleGetUser => exampleGetUser.userId);
import pulumi
import pulumi_aws as aws
example = aws.ssoadmin.get_instances()
example_get_user = aws.identitystore.get_user(identity_store_id=example.identity_store_ids[0],
    alternate_identifier={
        "unique_attribute": {
            "attribute_path": "UserName",
            "attribute_value": "ExampleUser",
        },
    })
pulumi.export("userId", example_get_user.user_id)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		exampleGetUser, err := identitystore.LookupUser(ctx, &identitystore.LookupUserArgs{
			IdentityStoreId: example.IdentityStoreIds[0],
			AlternateIdentifier: identitystore.GetUserAlternateIdentifier{
				UniqueAttribute: identitystore.GetUserAlternateIdentifierUniqueAttribute{
					AttributePath:  "UserName",
					AttributeValue: "ExampleUser",
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("userId", exampleGetUser.UserId)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.SsoAdmin.GetInstances.Invoke();
    var exampleGetUser = Aws.IdentityStore.GetUser.Invoke(new()
    {
        IdentityStoreId = example.Apply(getInstancesResult => getInstancesResult.IdentityStoreIds[0]),
        AlternateIdentifier = new Aws.IdentityStore.Inputs.GetUserAlternateIdentifierInputArgs
        {
            UniqueAttribute = new Aws.IdentityStore.Inputs.GetUserAlternateIdentifierUniqueAttributeInputArgs
            {
                AttributePath = "UserName",
                AttributeValue = "ExampleUser",
            },
        },
    });
    return new Dictionary<string, object?>
    {
        ["userId"] = exampleGetUser.Apply(getUserResult => getUserResult.UserId),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssoadmin.SsoadminFunctions;
import com.pulumi.aws.identitystore.IdentitystoreFunctions;
import com.pulumi.aws.identitystore.inputs.GetUserArgs;
import com.pulumi.aws.identitystore.inputs.GetUserAlternateIdentifierArgs;
import com.pulumi.aws.identitystore.inputs.GetUserAlternateIdentifierUniqueAttributeArgs;
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 = SsoadminFunctions.getInstances();
        final var exampleGetUser = IdentitystoreFunctions.getUser(GetUserArgs.builder()
            .identityStoreId(example.applyValue(getInstancesResult -> getInstancesResult.identityStoreIds()[0]))
            .alternateIdentifier(GetUserAlternateIdentifierArgs.builder()
                .uniqueAttribute(GetUserAlternateIdentifierUniqueAttributeArgs.builder()
                    .attributePath("UserName")
                    .attributeValue("ExampleUser")
                    .build())
                .build())
            .build());
        ctx.export("userId", exampleGetUser.applyValue(getUserResult -> getUserResult.userId()));
    }
}
variables:
  example:
    fn::invoke:
      function: aws:ssoadmin:getInstances
      arguments: {}
  exampleGetUser:
    fn::invoke:
      function: aws:identitystore:getUser
      arguments:
        identityStoreId: ${example.identityStoreIds[0]}
        alternateIdentifier:
          uniqueAttribute:
            attributePath: UserName
            attributeValue: ExampleUser
outputs:
  userId: ${exampleGetUser.userId}
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(alternate_identifier: Optional[GetUserAlternateIdentifier] = None,
             filter: Optional[GetUserFilter] = None,
             identity_store_id: Optional[str] = None,
             user_id: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(alternate_identifier: Optional[pulumi.Input[GetUserAlternateIdentifierArgs]] = None,
             filter: Optional[pulumi.Input[GetUserFilterArgs]] = None,
             identity_store_id: Optional[pulumi.Input[str]] = None,
             user_id: Optional[pulumi.Input[str]] = 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: aws:identitystore/getUser:getUser
  arguments:
    # arguments dictionaryThe following arguments are supported:
- IdentityStore stringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- AlternateIdentifier GetUser Alternate Identifier 
- A unique identifier for a user or group that is not the primary identifier. Conflicts with user_idandfilter. Detailed below.
- Filter
GetUser Filter 
- Configuration block for filtering by a unique attribute of the user. Detailed below.
- UserId string
- The identifier for a user in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- user_idis allowed for backwards compatibility.
- IdentityStore stringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- AlternateIdentifier GetUser Alternate Identifier 
- A unique identifier for a user or group that is not the primary identifier. Conflicts with user_idandfilter. Detailed below.
- Filter
GetUser Filter 
- Configuration block for filtering by a unique attribute of the user. Detailed below.
- UserId string
- The identifier for a user in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- user_idis allowed for backwards compatibility.
- identityStore StringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- alternateIdentifier GetUser Alternate Identifier 
- A unique identifier for a user or group that is not the primary identifier. Conflicts with user_idandfilter. Detailed below.
- filter
GetUser Filter 
- Configuration block for filtering by a unique attribute of the user. Detailed below.
- userId String
- The identifier for a user in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- user_idis allowed for backwards compatibility.
- identityStore stringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- alternateIdentifier GetUser Alternate Identifier 
- A unique identifier for a user or group that is not the primary identifier. Conflicts with user_idandfilter. Detailed below.
- filter
GetUser Filter 
- Configuration block for filtering by a unique attribute of the user. Detailed below.
- userId string
- The identifier for a user in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- user_idis allowed for backwards compatibility.
- identity_store_ strid 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- alternate_identifier GetUser Alternate Identifier 
- A unique identifier for a user or group that is not the primary identifier. Conflicts with user_idandfilter. Detailed below.
- filter
GetUser Filter 
- Configuration block for filtering by a unique attribute of the user. Detailed below.
- user_id str
- The identifier for a user in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- user_idis allowed for backwards compatibility.
- identityStore StringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- alternateIdentifier Property Map
- A unique identifier for a user or group that is not the primary identifier. Conflicts with user_idandfilter. Detailed below.
- filter Property Map
- Configuration block for filtering by a unique attribute of the user. Detailed below.
- userId String
- The identifier for a user in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- user_idis allowed for backwards compatibility.
getUser Result
The following output properties are available:
- Addresses
List<GetUser Address> 
- List of details about the user's address.
- DisplayName string
- The name that is typically displayed when the user is referenced.
- Emails
List<GetUser Email> 
- List of details about the user's email.
- ExternalIds List<GetUser External Id> 
- List of identifiers issued to this resource by an external identity provider.
- Id string
- The provider-assigned unique ID for this managed resource.
- IdentityStore stringId 
- Locale string
- The user's geographical region or location.
- Names
List<GetUser Name> 
- Details about the user's full name.
- Nickname string
- An alternate name for the user.
- PhoneNumbers List<GetUser Phone Number> 
- List of details about the user's phone number.
- PreferredLanguage string
- The preferred language of the user.
- ProfileUrl string
- An URL that may be associated with the user.
- Timezone string
- The user's time zone.
- Title string
- The user's title.
- UserId string
- UserName string
- User's user name value.
- UserType string
- The user type.
- AlternateIdentifier GetUser Alternate Identifier 
- Filter
GetUser Filter 
- Addresses
[]GetUser Address 
- List of details about the user's address.
- DisplayName string
- The name that is typically displayed when the user is referenced.
- Emails
[]GetUser Email 
- List of details about the user's email.
- ExternalIds []GetUser External Id 
- List of identifiers issued to this resource by an external identity provider.
- Id string
- The provider-assigned unique ID for this managed resource.
- IdentityStore stringId 
- Locale string
- The user's geographical region or location.
- Names
[]GetUser Name 
- Details about the user's full name.
- Nickname string
- An alternate name for the user.
- PhoneNumbers []GetUser Phone Number 
- List of details about the user's phone number.
- PreferredLanguage string
- The preferred language of the user.
- ProfileUrl string
- An URL that may be associated with the user.
- Timezone string
- The user's time zone.
- Title string
- The user's title.
- UserId string
- UserName string
- User's user name value.
- UserType string
- The user type.
- AlternateIdentifier GetUser Alternate Identifier 
- Filter
GetUser Filter 
- addresses
List<GetUser Address> 
- List of details about the user's address.
- displayName String
- The name that is typically displayed when the user is referenced.
- emails
List<GetUser Email> 
- List of details about the user's email.
- externalIds List<GetUser External Id> 
- List of identifiers issued to this resource by an external identity provider.
- id String
- The provider-assigned unique ID for this managed resource.
- identityStore StringId 
- locale String
- The user's geographical region or location.
- names
List<GetUser Name> 
- Details about the user's full name.
- nickname String
- An alternate name for the user.
- phoneNumbers List<GetUser Phone Number> 
- List of details about the user's phone number.
- preferredLanguage String
- The preferred language of the user.
- profileUrl String
- An URL that may be associated with the user.
- timezone String
- The user's time zone.
- title String
- The user's title.
- userId String
- userName String
- User's user name value.
- userType String
- The user type.
- alternateIdentifier GetUser Alternate Identifier 
- filter
GetUser Filter 
- addresses
GetUser Address[] 
- List of details about the user's address.
- displayName string
- The name that is typically displayed when the user is referenced.
- emails
GetUser Email[] 
- List of details about the user's email.
- externalIds GetUser External Id[] 
- List of identifiers issued to this resource by an external identity provider.
- id string
- The provider-assigned unique ID for this managed resource.
- identityStore stringId 
- locale string
- The user's geographical region or location.
- names
GetUser Name[] 
- Details about the user's full name.
- nickname string
- An alternate name for the user.
- phoneNumbers GetUser Phone Number[] 
- List of details about the user's phone number.
- preferredLanguage string
- The preferred language of the user.
- profileUrl string
- An URL that may be associated with the user.
- timezone string
- The user's time zone.
- title string
- The user's title.
- userId string
- userName string
- User's user name value.
- userType string
- The user type.
- alternateIdentifier GetUser Alternate Identifier 
- filter
GetUser Filter 
- addresses
Sequence[GetUser Address] 
- List of details about the user's address.
- display_name str
- The name that is typically displayed when the user is referenced.
- emails
Sequence[GetUser Email] 
- List of details about the user's email.
- external_ids Sequence[GetUser External Id] 
- List of identifiers issued to this resource by an external identity provider.
- id str
- The provider-assigned unique ID for this managed resource.
- identity_store_ strid 
- locale str
- The user's geographical region or location.
- names
Sequence[GetUser Name] 
- Details about the user's full name.
- nickname str
- An alternate name for the user.
- phone_numbers Sequence[GetUser Phone Number] 
- List of details about the user's phone number.
- preferred_language str
- The preferred language of the user.
- profile_url str
- An URL that may be associated with the user.
- timezone str
- The user's time zone.
- title str
- The user's title.
- user_id str
- user_name str
- User's user name value.
- user_type str
- The user type.
- alternate_identifier GetUser Alternate Identifier 
- filter
GetUser Filter 
- addresses List<Property Map>
- List of details about the user's address.
- displayName String
- The name that is typically displayed when the user is referenced.
- emails List<Property Map>
- List of details about the user's email.
- externalIds List<Property Map>
- List of identifiers issued to this resource by an external identity provider.
- id String
- The provider-assigned unique ID for this managed resource.
- identityStore StringId 
- locale String
- The user's geographical region or location.
- names List<Property Map>
- Details about the user's full name.
- nickname String
- An alternate name for the user.
- phoneNumbers List<Property Map>
- List of details about the user's phone number.
- preferredLanguage String
- The preferred language of the user.
- profileUrl String
- An URL that may be associated with the user.
- timezone String
- The user's time zone.
- title String
- The user's title.
- userId String
- userName String
- User's user name value.
- userType String
- The user type.
- alternateIdentifier Property Map
- filter Property Map
Supporting Types
GetUserAddress  
- Country string
- The country that this address is in.
- Formatted string
- The name that is typically displayed when the name is shown for display.
- Locality string
- The address locality.
- PostalCode string
- The postal code of the address.
- Primary bool
- When true, this is the primary phone number associated with the user.
- Region string
- The region of the address.
- StreetAddress string
- The street of the address.
- Type string
- The type of phone number.
- Country string
- The country that this address is in.
- Formatted string
- The name that is typically displayed when the name is shown for display.
- Locality string
- The address locality.
- PostalCode string
- The postal code of the address.
- Primary bool
- When true, this is the primary phone number associated with the user.
- Region string
- The region of the address.
- StreetAddress string
- The street of the address.
- Type string
- The type of phone number.
- country String
- The country that this address is in.
- formatted String
- The name that is typically displayed when the name is shown for display.
- locality String
- The address locality.
- postalCode String
- The postal code of the address.
- primary Boolean
- When true, this is the primary phone number associated with the user.
- region String
- The region of the address.
- streetAddress String
- The street of the address.
- type String
- The type of phone number.
- country string
- The country that this address is in.
- formatted string
- The name that is typically displayed when the name is shown for display.
- locality string
- The address locality.
- postalCode string
- The postal code of the address.
- primary boolean
- When true, this is the primary phone number associated with the user.
- region string
- The region of the address.
- streetAddress string
- The street of the address.
- type string
- The type of phone number.
- country str
- The country that this address is in.
- formatted str
- The name that is typically displayed when the name is shown for display.
- locality str
- The address locality.
- postal_code str
- The postal code of the address.
- primary bool
- When true, this is the primary phone number associated with the user.
- region str
- The region of the address.
- street_address str
- The street of the address.
- type str
- The type of phone number.
- country String
- The country that this address is in.
- formatted String
- The name that is typically displayed when the name is shown for display.
- locality String
- The address locality.
- postalCode String
- The postal code of the address.
- primary Boolean
- When true, this is the primary phone number associated with the user.
- region String
- The region of the address.
- streetAddress String
- The street of the address.
- type String
- The type of phone number.
GetUserAlternateIdentifier   
- ExternalId GetUser Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- UniqueAttribute GetUser Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- ExternalId GetUser Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- UniqueAttribute GetUser Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- externalId GetUser Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- uniqueAttribute GetUser Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- externalId GetUser Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- uniqueAttribute GetUser Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- external_id GetUser Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- unique_attribute GetUser Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- externalId Property Map
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- uniqueAttribute Property Map
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
GetUserAlternateIdentifierExternalId     
GetUserAlternateIdentifierUniqueAttribute     
- AttributePath string
- Attribute path that is used to specify which attribute name to search. For example: UserName. Refer to the User data type.
- AttributeValue string
- Value for an attribute.
- AttributePath string
- Attribute path that is used to specify which attribute name to search. For example: UserName. Refer to the User data type.
- AttributeValue string
- Value for an attribute.
- attributePath String
- Attribute path that is used to specify which attribute name to search. For example: UserName. Refer to the User data type.
- attributeValue String
- Value for an attribute.
- attributePath string
- Attribute path that is used to specify which attribute name to search. For example: UserName. Refer to the User data type.
- attributeValue string
- Value for an attribute.
- attribute_path str
- Attribute path that is used to specify which attribute name to search. For example: UserName. Refer to the User data type.
- attribute_value str
- Value for an attribute.
- attributePath String
- Attribute path that is used to specify which attribute name to search. For example: UserName. Refer to the User data type.
- attributeValue String
- Value for an attribute.
GetUserEmail  
GetUserExternalId   
GetUserFilter  
- AttributePath string
- Attribute path that is used to specify which attribute name to search. Currently, UserNameis the only valid attribute path.
- AttributeValue string
- Value for an attribute.
- AttributePath string
- Attribute path that is used to specify which attribute name to search. Currently, UserNameis the only valid attribute path.
- AttributeValue string
- Value for an attribute.
- attributePath String
- Attribute path that is used to specify which attribute name to search. Currently, UserNameis the only valid attribute path.
- attributeValue String
- Value for an attribute.
- attributePath string
- Attribute path that is used to specify which attribute name to search. Currently, UserNameis the only valid attribute path.
- attributeValue string
- Value for an attribute.
- attribute_path str
- Attribute path that is used to specify which attribute name to search. Currently, UserNameis the only valid attribute path.
- attribute_value str
- Value for an attribute.
- attributePath String
- Attribute path that is used to specify which attribute name to search. Currently, UserNameis the only valid attribute path.
- attributeValue String
- Value for an attribute.
GetUserName  
- FamilyName string
- The family name of the user.
- Formatted string
- The name that is typically displayed when the name is shown for display.
- GivenName string
- The given name of the user.
- HonorificPrefix string
- The honorific prefix of the user.
- HonorificSuffix string
- The honorific suffix of the user.
- MiddleName string
- The middle name of the user.
- FamilyName string
- The family name of the user.
- Formatted string
- The name that is typically displayed when the name is shown for display.
- GivenName string
- The given name of the user.
- HonorificPrefix string
- The honorific prefix of the user.
- HonorificSuffix string
- The honorific suffix of the user.
- MiddleName string
- The middle name of the user.
- familyName String
- The family name of the user.
- formatted String
- The name that is typically displayed when the name is shown for display.
- givenName String
- The given name of the user.
- honorificPrefix String
- The honorific prefix of the user.
- honorificSuffix String
- The honorific suffix of the user.
- middleName String
- The middle name of the user.
- familyName string
- The family name of the user.
- formatted string
- The name that is typically displayed when the name is shown for display.
- givenName string
- The given name of the user.
- honorificPrefix string
- The honorific prefix of the user.
- honorificSuffix string
- The honorific suffix of the user.
- middleName string
- The middle name of the user.
- family_name str
- The family name of the user.
- formatted str
- The name that is typically displayed when the name is shown for display.
- given_name str
- The given name of the user.
- honorific_prefix str
- The honorific prefix of the user.
- honorific_suffix str
- The honorific suffix of the user.
- middle_name str
- The middle name of the user.
- familyName String
- The family name of the user.
- formatted String
- The name that is typically displayed when the name is shown for display.
- givenName String
- The given name of the user.
- honorificPrefix String
- The honorific prefix of the user.
- honorificSuffix String
- The honorific suffix of the user.
- middleName String
- The middle name of the user.
GetUserPhoneNumber   
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.