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, nil, 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:identitystore/getUser:getUser
arguments:
# arguments dictionary
The following arguments are supported:
- Identity
Store stringId 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_id
andfilter
. Detailed below. - Filter
Get
User Filter - Configuration block for filtering by a unique attribute of the user. Detailed below.
- User
Id string The identifier for a user in the Identity Store.
Exactly one of the above arguments must be provided. Passing both
filter
anduser_id
is allowed for backwards compatibility.
- Identity
Store stringId 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_id
andfilter
. Detailed below. - Filter
Get
User Filter - Configuration block for filtering by a unique attribute of the user. Detailed below.
- User
Id string The identifier for a user in the Identity Store.
Exactly one of the above arguments must be provided. Passing both
filter
anduser_id
is allowed for backwards compatibility.
- identity
Store StringId 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_id
andfilter
. Detailed below. - filter
Get
User Filter - Configuration block for filtering by a unique attribute of the user. Detailed below.
- user
Id String The identifier for a user in the Identity Store.
Exactly one of the above arguments must be provided. Passing both
filter
anduser_id
is allowed for backwards compatibility.
- identity
Store stringId 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_id
andfilter
. Detailed below. - filter
Get
User Filter - Configuration block for filtering by a unique attribute of the user. Detailed below.
- user
Id string The identifier for a user in the Identity Store.
Exactly one of the above arguments must be provided. Passing both
filter
anduser_id
is 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_id
andfilter
. Detailed below. - filter
Get
User 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
filter
anduser_id
is allowed for backwards compatibility.
- identity
Store StringId Identity Store ID associated with the Single Sign-On Instance.
The following arguments are optional:
- alternate
Identifier Property Map - A unique identifier for a user or group that is not the primary identifier. Conflicts with
user_id
andfilter
. Detailed below. - filter Property Map
- Configuration block for filtering by a unique attribute of the user. Detailed below.
- user
Id String The identifier for a user in the Identity Store.
Exactly one of the above arguments must be provided. Passing both
filter
anduser_id
is allowed for backwards compatibility.
getUser Result
The following output properties are available:
- Addresses
List<Get
User Address> - List of details about the user's address.
- Display
Name string - The name that is typically displayed when the user is referenced.
- Emails
List<Get
User Email> - List of details about the user's email.
- External
Ids 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.
- Identity
Store stringId - Locale string
- The user's geographical region or location.
- Names
List<Get
User Name> - Details about the user's full name.
- Nickname string
- An alternate name for the user.
- Phone
Numbers List<GetUser Phone Number> - List of details about the user's phone number.
- Preferred
Language string - The preferred language of the user.
- Profile
Url string - An URL that may be associated with the user.
- Timezone string
- The user's time zone.
- Title string
- The user's title.
- User
Id string - User
Name string - User's user name value.
- User
Type string - The user type.
- Alternate
Identifier GetUser Alternate Identifier - Filter
Get
User Filter
- Addresses
[]Get
User Address - List of details about the user's address.
- Display
Name string - The name that is typically displayed when the user is referenced.
- Emails
[]Get
User Email - List of details about the user's email.
- External
Ids []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.
- Identity
Store stringId - Locale string
- The user's geographical region or location.
- Names
[]Get
User Name - Details about the user's full name.
- Nickname string
- An alternate name for the user.
- Phone
Numbers []GetUser Phone Number - List of details about the user's phone number.
- Preferred
Language string - The preferred language of the user.
- Profile
Url string - An URL that may be associated with the user.
- Timezone string
- The user's time zone.
- Title string
- The user's title.
- User
Id string - User
Name string - User's user name value.
- User
Type string - The user type.
- Alternate
Identifier GetUser Alternate Identifier - Filter
Get
User Filter
- addresses
List<Get
User Address> - List of details about the user's address.
- display
Name String - The name that is typically displayed when the user is referenced.
- emails
List<Get
User Email> - List of details about the user's email.
- external
Ids 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.
- identity
Store StringId - locale String
- The user's geographical region or location.
- names
List<Get
User Name> - Details about the user's full name.
- nickname String
- An alternate name for the user.
- phone
Numbers List<GetUser Phone Number> - List of details about the user's phone number.
- preferred
Language String - The preferred language of the user.
- profile
Url String - An URL that may be associated with the user.
- timezone String
- The user's time zone.
- title String
- The user's title.
- user
Id String - user
Name String - User's user name value.
- user
Type String - The user type.
- alternate
Identifier GetUser Alternate Identifier - filter
Get
User Filter
- addresses
Get
User Address[] - List of details about the user's address.
- display
Name string - The name that is typically displayed when the user is referenced.
- emails
Get
User Email[] - List of details about the user's email.
- external
Ids 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.
- identity
Store stringId - locale string
- The user's geographical region or location.
- names
Get
User Name[] - Details about the user's full name.
- nickname string
- An alternate name for the user.
- phone
Numbers GetUser Phone Number[] - List of details about the user's phone number.
- preferred
Language string - The preferred language of the user.
- profile
Url string - An URL that may be associated with the user.
- timezone string
- The user's time zone.
- title string
- The user's title.
- user
Id string - user
Name string - User's user name value.
- user
Type string - The user type.
- alternate
Identifier GetUser Alternate Identifier - filter
Get
User Filter
- addresses
Sequence[Get
User 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[Get
User 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[Get
User 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
Get
User Filter
- addresses List<Property Map>
- List of details about the user's address.
- display
Name String - The name that is typically displayed when the user is referenced.
- emails List<Property Map>
- List of details about the user's email.
- external
Ids 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.
- identity
Store 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.
- phone
Numbers List<Property Map> - List of details about the user's phone number.
- preferred
Language String - The preferred language of the user.
- profile
Url String - An URL that may be associated with the user.
- timezone String
- The user's time zone.
- title String
- The user's title.
- user
Id String - user
Name String - User's user name value.
- user
Type String - The user type.
- alternate
Identifier 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.
- Postal
Code 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.
- Street
Address 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.
- Postal
Code 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.
- Street
Address 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.
- postal
Code 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.
- street
Address 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.
- postal
Code 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.
- street
Address 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.
- postal
Code 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.
- street
Address String - The street of the address.
- type String
- The type of phone number.
GetUserAlternateIdentifier
- 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.
- 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.
- 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.
- 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.
- 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.
- external
Id Property Map - Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- unique
Attribute 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
- Attribute
Path string - Attribute path that is used to specify which attribute name to search. For example:
UserName
. Refer to the User data type. - Attribute
Value string - Value for an attribute.
- Attribute
Path string - Attribute path that is used to specify which attribute name to search. For example:
UserName
. Refer to the User data type. - Attribute
Value string - Value for an attribute.
- attribute
Path String - Attribute path that is used to specify which attribute name to search. For example:
UserName
. Refer to the User data type. - attribute
Value String - Value for an attribute.
- attribute
Path string - Attribute path that is used to specify which attribute name to search. For example:
UserName
. Refer to the User data type. - attribute
Value 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.
- attribute
Path String - Attribute path that is used to specify which attribute name to search. For example:
UserName
. Refer to the User data type. - attribute
Value String - Value for an attribute.
GetUserEmail
GetUserExternalId
GetUserFilter
- Attribute
Path string - Attribute path that is used to specify which attribute name to search. Currently,
UserName
is the only valid attribute path. - Attribute
Value string - Value for an attribute.
- Attribute
Path string - Attribute path that is used to specify which attribute name to search. Currently,
UserName
is the only valid attribute path. - Attribute
Value string - Value for an attribute.
- attribute
Path String - Attribute path that is used to specify which attribute name to search. Currently,
UserName
is the only valid attribute path. - attribute
Value String - Value for an attribute.
- attribute
Path string - Attribute path that is used to specify which attribute name to search. Currently,
UserName
is the only valid attribute path. - attribute
Value string - Value for an attribute.
- attribute_
path str - Attribute path that is used to specify which attribute name to search. Currently,
UserName
is the only valid attribute path. - attribute_
value str - Value for an attribute.
- attribute
Path String - Attribute path that is used to specify which attribute name to search. Currently,
UserName
is the only valid attribute path. - attribute
Value String - Value for an attribute.
GetUserName
- Family
Name string - The family name of the user.
- Formatted string
- The name that is typically displayed when the name is shown for display.
- Given
Name string - The given name of the user.
- Honorific
Prefix string - The honorific prefix of the user.
- Honorific
Suffix string - The honorific suffix of the user.
- Middle
Name string - The middle name of the user.
- Family
Name string - The family name of the user.
- Formatted string
- The name that is typically displayed when the name is shown for display.
- Given
Name string - The given name of the user.
- Honorific
Prefix string - The honorific prefix of the user.
- Honorific
Suffix string - The honorific suffix of the user.
- Middle
Name string - The middle name of the user.
- family
Name String - The family name of the user.
- formatted String
- The name that is typically displayed when the name is shown for display.
- given
Name String - The given name of the user.
- honorific
Prefix String - The honorific prefix of the user.
- honorific
Suffix String - The honorific suffix of the user.
- middle
Name String - The middle name of the user.
- family
Name string - The family name of the user.
- formatted string
- The name that is typically displayed when the name is shown for display.
- given
Name string - The given name of the user.
- honorific
Prefix string - The honorific prefix of the user.
- honorific
Suffix string - The honorific suffix of the user.
- middle
Name 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.
- family
Name String - The family name of the user.
- formatted String
- The name that is typically displayed when the name is shown for display.
- given
Name String - The given name of the user.
- honorific
Prefix String - The honorific prefix of the user.
- honorific
Suffix String - The honorific suffix of the user.
- middle
Name 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
aws
Terraform Provider.