github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/identitystore/getUser.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package identitystore 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Use this data source to get an Identity Store User. 15 func LookupUser(ctx *pulumi.Context, args *LookupUserArgs, opts ...pulumi.InvokeOption) (*LookupUserResult, error) { 16 opts = internal.PkgInvokeDefaultOpts(opts) 17 var rv LookupUserResult 18 err := ctx.Invoke("aws:identitystore/getUser:getUser", args, &rv, opts...) 19 if err != nil { 20 return nil, err 21 } 22 return &rv, nil 23 } 24 25 // A collection of arguments for invoking getUser. 26 type LookupUserArgs struct { 27 // A unique identifier for a user or group that is not the primary identifier. Conflicts with `userId` and `filter`. Detailed below. 28 AlternateIdentifier *GetUserAlternateIdentifier `pulumi:"alternateIdentifier"` 29 // Configuration block for filtering by a unique attribute of the user. Detailed below. 30 // 31 // Deprecated: Use the alternateIdentifier attribute instead. 32 Filter *GetUserFilter `pulumi:"filter"` 33 // Identity Store ID associated with the Single Sign-On Instance. 34 // 35 // The following arguments are optional: 36 IdentityStoreId string `pulumi:"identityStoreId"` 37 // The identifier for a user in the Identity Store. 38 // 39 // > Exactly one of the above arguments must be provided. Passing both `filter` and `userId` is allowed for backwards compatibility. 40 UserId *string `pulumi:"userId"` 41 } 42 43 // A collection of values returned by getUser. 44 type LookupUserResult struct { 45 // List of details about the user's address. 46 Addresses []GetUserAddress `pulumi:"addresses"` 47 AlternateIdentifier *GetUserAlternateIdentifier `pulumi:"alternateIdentifier"` 48 // The name that is typically displayed when the user is referenced. 49 DisplayName string `pulumi:"displayName"` 50 // List of details about the user's email. 51 Emails []GetUserEmail `pulumi:"emails"` 52 // List of identifiers issued to this resource by an external identity provider. 53 ExternalIds []GetUserExternalId `pulumi:"externalIds"` 54 // Deprecated: Use the alternateIdentifier attribute instead. 55 Filter *GetUserFilter `pulumi:"filter"` 56 // The provider-assigned unique ID for this managed resource. 57 Id string `pulumi:"id"` 58 IdentityStoreId string `pulumi:"identityStoreId"` 59 // The user's geographical region or location. 60 Locale string `pulumi:"locale"` 61 // Details about the user's full name. 62 Names []GetUserName `pulumi:"names"` 63 // An alternate name for the user. 64 Nickname string `pulumi:"nickname"` 65 // List of details about the user's phone number. 66 PhoneNumbers []GetUserPhoneNumber `pulumi:"phoneNumbers"` 67 // The preferred language of the user. 68 PreferredLanguage string `pulumi:"preferredLanguage"` 69 // An URL that may be associated with the user. 70 ProfileUrl string `pulumi:"profileUrl"` 71 // The user's time zone. 72 Timezone string `pulumi:"timezone"` 73 // The user's title. 74 Title string `pulumi:"title"` 75 UserId string `pulumi:"userId"` 76 // User's user name value. 77 UserName string `pulumi:"userName"` 78 // The user type. 79 UserType string `pulumi:"userType"` 80 } 81 82 func LookupUserOutput(ctx *pulumi.Context, args LookupUserOutputArgs, opts ...pulumi.InvokeOption) LookupUserResultOutput { 83 return pulumi.ToOutputWithContext(context.Background(), args). 84 ApplyT(func(v interface{}) (LookupUserResult, error) { 85 args := v.(LookupUserArgs) 86 r, err := LookupUser(ctx, &args, opts...) 87 var s LookupUserResult 88 if r != nil { 89 s = *r 90 } 91 return s, err 92 }).(LookupUserResultOutput) 93 } 94 95 // A collection of arguments for invoking getUser. 96 type LookupUserOutputArgs struct { 97 // A unique identifier for a user or group that is not the primary identifier. Conflicts with `userId` and `filter`. Detailed below. 98 AlternateIdentifier GetUserAlternateIdentifierPtrInput `pulumi:"alternateIdentifier"` 99 // Configuration block for filtering by a unique attribute of the user. Detailed below. 100 // 101 // Deprecated: Use the alternateIdentifier attribute instead. 102 Filter GetUserFilterPtrInput `pulumi:"filter"` 103 // Identity Store ID associated with the Single Sign-On Instance. 104 // 105 // The following arguments are optional: 106 IdentityStoreId pulumi.StringInput `pulumi:"identityStoreId"` 107 // The identifier for a user in the Identity Store. 108 // 109 // > Exactly one of the above arguments must be provided. Passing both `filter` and `userId` is allowed for backwards compatibility. 110 UserId pulumi.StringPtrInput `pulumi:"userId"` 111 } 112 113 func (LookupUserOutputArgs) ElementType() reflect.Type { 114 return reflect.TypeOf((*LookupUserArgs)(nil)).Elem() 115 } 116 117 // A collection of values returned by getUser. 118 type LookupUserResultOutput struct{ *pulumi.OutputState } 119 120 func (LookupUserResultOutput) ElementType() reflect.Type { 121 return reflect.TypeOf((*LookupUserResult)(nil)).Elem() 122 } 123 124 func (o LookupUserResultOutput) ToLookupUserResultOutput() LookupUserResultOutput { 125 return o 126 } 127 128 func (o LookupUserResultOutput) ToLookupUserResultOutputWithContext(ctx context.Context) LookupUserResultOutput { 129 return o 130 } 131 132 // List of details about the user's address. 133 func (o LookupUserResultOutput) Addresses() GetUserAddressArrayOutput { 134 return o.ApplyT(func(v LookupUserResult) []GetUserAddress { return v.Addresses }).(GetUserAddressArrayOutput) 135 } 136 137 func (o LookupUserResultOutput) AlternateIdentifier() GetUserAlternateIdentifierPtrOutput { 138 return o.ApplyT(func(v LookupUserResult) *GetUserAlternateIdentifier { return v.AlternateIdentifier }).(GetUserAlternateIdentifierPtrOutput) 139 } 140 141 // The name that is typically displayed when the user is referenced. 142 func (o LookupUserResultOutput) DisplayName() pulumi.StringOutput { 143 return o.ApplyT(func(v LookupUserResult) string { return v.DisplayName }).(pulumi.StringOutput) 144 } 145 146 // List of details about the user's email. 147 func (o LookupUserResultOutput) Emails() GetUserEmailArrayOutput { 148 return o.ApplyT(func(v LookupUserResult) []GetUserEmail { return v.Emails }).(GetUserEmailArrayOutput) 149 } 150 151 // List of identifiers issued to this resource by an external identity provider. 152 func (o LookupUserResultOutput) ExternalIds() GetUserExternalIdArrayOutput { 153 return o.ApplyT(func(v LookupUserResult) []GetUserExternalId { return v.ExternalIds }).(GetUserExternalIdArrayOutput) 154 } 155 156 // Deprecated: Use the alternateIdentifier attribute instead. 157 func (o LookupUserResultOutput) Filter() GetUserFilterPtrOutput { 158 return o.ApplyT(func(v LookupUserResult) *GetUserFilter { return v.Filter }).(GetUserFilterPtrOutput) 159 } 160 161 // The provider-assigned unique ID for this managed resource. 162 func (o LookupUserResultOutput) Id() pulumi.StringOutput { 163 return o.ApplyT(func(v LookupUserResult) string { return v.Id }).(pulumi.StringOutput) 164 } 165 166 func (o LookupUserResultOutput) IdentityStoreId() pulumi.StringOutput { 167 return o.ApplyT(func(v LookupUserResult) string { return v.IdentityStoreId }).(pulumi.StringOutput) 168 } 169 170 // The user's geographical region or location. 171 func (o LookupUserResultOutput) Locale() pulumi.StringOutput { 172 return o.ApplyT(func(v LookupUserResult) string { return v.Locale }).(pulumi.StringOutput) 173 } 174 175 // Details about the user's full name. 176 func (o LookupUserResultOutput) Names() GetUserNameArrayOutput { 177 return o.ApplyT(func(v LookupUserResult) []GetUserName { return v.Names }).(GetUserNameArrayOutput) 178 } 179 180 // An alternate name for the user. 181 func (o LookupUserResultOutput) Nickname() pulumi.StringOutput { 182 return o.ApplyT(func(v LookupUserResult) string { return v.Nickname }).(pulumi.StringOutput) 183 } 184 185 // List of details about the user's phone number. 186 func (o LookupUserResultOutput) PhoneNumbers() GetUserPhoneNumberArrayOutput { 187 return o.ApplyT(func(v LookupUserResult) []GetUserPhoneNumber { return v.PhoneNumbers }).(GetUserPhoneNumberArrayOutput) 188 } 189 190 // The preferred language of the user. 191 func (o LookupUserResultOutput) PreferredLanguage() pulumi.StringOutput { 192 return o.ApplyT(func(v LookupUserResult) string { return v.PreferredLanguage }).(pulumi.StringOutput) 193 } 194 195 // An URL that may be associated with the user. 196 func (o LookupUserResultOutput) ProfileUrl() pulumi.StringOutput { 197 return o.ApplyT(func(v LookupUserResult) string { return v.ProfileUrl }).(pulumi.StringOutput) 198 } 199 200 // The user's time zone. 201 func (o LookupUserResultOutput) Timezone() pulumi.StringOutput { 202 return o.ApplyT(func(v LookupUserResult) string { return v.Timezone }).(pulumi.StringOutput) 203 } 204 205 // The user's title. 206 func (o LookupUserResultOutput) Title() pulumi.StringOutput { 207 return o.ApplyT(func(v LookupUserResult) string { return v.Title }).(pulumi.StringOutput) 208 } 209 210 func (o LookupUserResultOutput) UserId() pulumi.StringOutput { 211 return o.ApplyT(func(v LookupUserResult) string { return v.UserId }).(pulumi.StringOutput) 212 } 213 214 // User's user name value. 215 func (o LookupUserResultOutput) UserName() pulumi.StringOutput { 216 return o.ApplyT(func(v LookupUserResult) string { return v.UserName }).(pulumi.StringOutput) 217 } 218 219 // The user type. 220 func (o LookupUserResultOutput) UserType() pulumi.StringOutput { 221 return o.ApplyT(func(v LookupUserResult) string { return v.UserType }).(pulumi.StringOutput) 222 } 223 224 func init() { 225 pulumi.RegisterOutputType(LookupUserResultOutput{}) 226 }