github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cognito/getUserPoolClient.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 cognito 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 // Provides a Cognito User Pool Client resource. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := cognito.LookupUserPoolClient(ctx, &cognito.LookupUserPoolClientArgs{ 32 // ClientId: "38fjsnc484p94kpqsnet7mpld0", 33 // UserPoolId: "us-west-2_aaaaaaaaa", 34 // }, nil) 35 // if err != nil { 36 // return err 37 // } 38 // return nil 39 // }) 40 // } 41 // 42 // ``` 43 // <!--End PulumiCodeChooser --> 44 func LookupUserPoolClient(ctx *pulumi.Context, args *LookupUserPoolClientArgs, opts ...pulumi.InvokeOption) (*LookupUserPoolClientResult, error) { 45 opts = internal.PkgInvokeDefaultOpts(opts) 46 var rv LookupUserPoolClientResult 47 err := ctx.Invoke("aws:cognito/getUserPoolClient:getUserPoolClient", args, &rv, opts...) 48 if err != nil { 49 return nil, err 50 } 51 return &rv, nil 52 } 53 54 // A collection of arguments for invoking getUserPoolClient. 55 type LookupUserPoolClientArgs struct { 56 // Client Id of the user pool. 57 ClientId string `pulumi:"clientId"` 58 // User pool the client belongs to. 59 UserPoolId string `pulumi:"userPoolId"` 60 } 61 62 // A collection of values returned by getUserPoolClient. 63 type LookupUserPoolClientResult struct { 64 // (Optional) Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used. This value will be overridden if you have entered a value in `tokenValidityUnits`. 65 AccessTokenValidity int `pulumi:"accessTokenValidity"` 66 // (Optional) List of allowed OAuth flows (code, implicit, client_credentials). 67 AllowedOauthFlows []string `pulumi:"allowedOauthFlows"` 68 // (Optional) Whether the client is allowed to follow the OAuth protocol when interacting with Cognito user pools. 69 AllowedOauthFlowsUserPoolClient bool `pulumi:"allowedOauthFlowsUserPoolClient"` 70 // (Optional) List of allowed OAuth scopes (phone, email, openid, profile, and aws.cognito.signin.user.admin). 71 AllowedOauthScopes []string `pulumi:"allowedOauthScopes"` 72 // (Optional) Configuration block for Amazon Pinpoint analytics for collecting metrics for this user pool. Detailed below. 73 AnalyticsConfigurations []GetUserPoolClientAnalyticsConfiguration `pulumi:"analyticsConfigurations"` 74 // (Optional) List of allowed callback URLs for the identity providers. 75 CallbackUrls []string `pulumi:"callbackUrls"` 76 ClientId string `pulumi:"clientId"` 77 // Client secret of the user pool client. 78 ClientSecret string `pulumi:"clientSecret"` 79 // (Optional) Default redirect URI. Must be in the list of callback URLs. 80 DefaultRedirectUri string `pulumi:"defaultRedirectUri"` 81 EnablePropagateAdditionalUserContextData bool `pulumi:"enablePropagateAdditionalUserContextData"` 82 // (Optional) Enables or disables token revocation. 83 EnableTokenRevocation bool `pulumi:"enableTokenRevocation"` 84 // (Optional) List of authentication flows (ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY, USER_PASSWORD_AUTH, ALLOW_ADMIN_USER_PASSWORD_AUTH, ALLOW_CUSTOM_AUTH, ALLOW_USER_PASSWORD_AUTH, ALLOW_USER_SRP_AUTH, ALLOW_REFRESH_TOKEN_AUTH). 85 ExplicitAuthFlows []string `pulumi:"explicitAuthFlows"` 86 // (Optional) Should an application secret be generated. 87 GenerateSecret bool `pulumi:"generateSecret"` 88 // The provider-assigned unique ID for this managed resource. 89 Id string `pulumi:"id"` 90 // (Optional) Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used. This value will be overridden if you have entered a value in `tokenValidityUnits`. 91 IdTokenValidity int `pulumi:"idTokenValidity"` 92 // (Optional) List of allowed logout URLs for the identity providers. 93 LogoutUrls []string `pulumi:"logoutUrls"` 94 Name string `pulumi:"name"` 95 // (Optional) Choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to `ENABLED` and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to `LEGACY`, those APIs will return a `UserNotFoundException` exception if the user does not exist in the user pool. 96 PreventUserExistenceErrors string `pulumi:"preventUserExistenceErrors"` 97 // (Optional) List of user pool attributes the application client can read from. 98 ReadAttributes []string `pulumi:"readAttributes"` 99 // (Optional) Time limit in days refresh tokens are valid for. 100 RefreshTokenValidity int `pulumi:"refreshTokenValidity"` 101 // (Optional) List of provider names for the identity providers that are supported on this client. Uses the `providerName` attribute of `cognito.IdentityProvider` resource(s), or the equivalent string(s). 102 SupportedIdentityProviders []string `pulumi:"supportedIdentityProviders"` 103 // (Optional) Configuration block for units in which the validity times are represented in. Detailed below. 104 TokenValidityUnits []GetUserPoolClientTokenValidityUnit `pulumi:"tokenValidityUnits"` 105 UserPoolId string `pulumi:"userPoolId"` 106 // (Optional) List of user pool attributes the application client can write to. 107 WriteAttributes []string `pulumi:"writeAttributes"` 108 } 109 110 func LookupUserPoolClientOutput(ctx *pulumi.Context, args LookupUserPoolClientOutputArgs, opts ...pulumi.InvokeOption) LookupUserPoolClientResultOutput { 111 return pulumi.ToOutputWithContext(context.Background(), args). 112 ApplyT(func(v interface{}) (LookupUserPoolClientResult, error) { 113 args := v.(LookupUserPoolClientArgs) 114 r, err := LookupUserPoolClient(ctx, &args, opts...) 115 var s LookupUserPoolClientResult 116 if r != nil { 117 s = *r 118 } 119 return s, err 120 }).(LookupUserPoolClientResultOutput) 121 } 122 123 // A collection of arguments for invoking getUserPoolClient. 124 type LookupUserPoolClientOutputArgs struct { 125 // Client Id of the user pool. 126 ClientId pulumi.StringInput `pulumi:"clientId"` 127 // User pool the client belongs to. 128 UserPoolId pulumi.StringInput `pulumi:"userPoolId"` 129 } 130 131 func (LookupUserPoolClientOutputArgs) ElementType() reflect.Type { 132 return reflect.TypeOf((*LookupUserPoolClientArgs)(nil)).Elem() 133 } 134 135 // A collection of values returned by getUserPoolClient. 136 type LookupUserPoolClientResultOutput struct{ *pulumi.OutputState } 137 138 func (LookupUserPoolClientResultOutput) ElementType() reflect.Type { 139 return reflect.TypeOf((*LookupUserPoolClientResult)(nil)).Elem() 140 } 141 142 func (o LookupUserPoolClientResultOutput) ToLookupUserPoolClientResultOutput() LookupUserPoolClientResultOutput { 143 return o 144 } 145 146 func (o LookupUserPoolClientResultOutput) ToLookupUserPoolClientResultOutputWithContext(ctx context.Context) LookupUserPoolClientResultOutput { 147 return o 148 } 149 150 // (Optional) Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used. This value will be overridden if you have entered a value in `tokenValidityUnits`. 151 func (o LookupUserPoolClientResultOutput) AccessTokenValidity() pulumi.IntOutput { 152 return o.ApplyT(func(v LookupUserPoolClientResult) int { return v.AccessTokenValidity }).(pulumi.IntOutput) 153 } 154 155 // (Optional) List of allowed OAuth flows (code, implicit, client_credentials). 156 func (o LookupUserPoolClientResultOutput) AllowedOauthFlows() pulumi.StringArrayOutput { 157 return o.ApplyT(func(v LookupUserPoolClientResult) []string { return v.AllowedOauthFlows }).(pulumi.StringArrayOutput) 158 } 159 160 // (Optional) Whether the client is allowed to follow the OAuth protocol when interacting with Cognito user pools. 161 func (o LookupUserPoolClientResultOutput) AllowedOauthFlowsUserPoolClient() pulumi.BoolOutput { 162 return o.ApplyT(func(v LookupUserPoolClientResult) bool { return v.AllowedOauthFlowsUserPoolClient }).(pulumi.BoolOutput) 163 } 164 165 // (Optional) List of allowed OAuth scopes (phone, email, openid, profile, and aws.cognito.signin.user.admin). 166 func (o LookupUserPoolClientResultOutput) AllowedOauthScopes() pulumi.StringArrayOutput { 167 return o.ApplyT(func(v LookupUserPoolClientResult) []string { return v.AllowedOauthScopes }).(pulumi.StringArrayOutput) 168 } 169 170 // (Optional) Configuration block for Amazon Pinpoint analytics for collecting metrics for this user pool. Detailed below. 171 func (o LookupUserPoolClientResultOutput) AnalyticsConfigurations() GetUserPoolClientAnalyticsConfigurationArrayOutput { 172 return o.ApplyT(func(v LookupUserPoolClientResult) []GetUserPoolClientAnalyticsConfiguration { 173 return v.AnalyticsConfigurations 174 }).(GetUserPoolClientAnalyticsConfigurationArrayOutput) 175 } 176 177 // (Optional) List of allowed callback URLs for the identity providers. 178 func (o LookupUserPoolClientResultOutput) CallbackUrls() pulumi.StringArrayOutput { 179 return o.ApplyT(func(v LookupUserPoolClientResult) []string { return v.CallbackUrls }).(pulumi.StringArrayOutput) 180 } 181 182 func (o LookupUserPoolClientResultOutput) ClientId() pulumi.StringOutput { 183 return o.ApplyT(func(v LookupUserPoolClientResult) string { return v.ClientId }).(pulumi.StringOutput) 184 } 185 186 // Client secret of the user pool client. 187 func (o LookupUserPoolClientResultOutput) ClientSecret() pulumi.StringOutput { 188 return o.ApplyT(func(v LookupUserPoolClientResult) string { return v.ClientSecret }).(pulumi.StringOutput) 189 } 190 191 // (Optional) Default redirect URI. Must be in the list of callback URLs. 192 func (o LookupUserPoolClientResultOutput) DefaultRedirectUri() pulumi.StringOutput { 193 return o.ApplyT(func(v LookupUserPoolClientResult) string { return v.DefaultRedirectUri }).(pulumi.StringOutput) 194 } 195 196 func (o LookupUserPoolClientResultOutput) EnablePropagateAdditionalUserContextData() pulumi.BoolOutput { 197 return o.ApplyT(func(v LookupUserPoolClientResult) bool { return v.EnablePropagateAdditionalUserContextData }).(pulumi.BoolOutput) 198 } 199 200 // (Optional) Enables or disables token revocation. 201 func (o LookupUserPoolClientResultOutput) EnableTokenRevocation() pulumi.BoolOutput { 202 return o.ApplyT(func(v LookupUserPoolClientResult) bool { return v.EnableTokenRevocation }).(pulumi.BoolOutput) 203 } 204 205 // (Optional) List of authentication flows (ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY, USER_PASSWORD_AUTH, ALLOW_ADMIN_USER_PASSWORD_AUTH, ALLOW_CUSTOM_AUTH, ALLOW_USER_PASSWORD_AUTH, ALLOW_USER_SRP_AUTH, ALLOW_REFRESH_TOKEN_AUTH). 206 func (o LookupUserPoolClientResultOutput) ExplicitAuthFlows() pulumi.StringArrayOutput { 207 return o.ApplyT(func(v LookupUserPoolClientResult) []string { return v.ExplicitAuthFlows }).(pulumi.StringArrayOutput) 208 } 209 210 // (Optional) Should an application secret be generated. 211 func (o LookupUserPoolClientResultOutput) GenerateSecret() pulumi.BoolOutput { 212 return o.ApplyT(func(v LookupUserPoolClientResult) bool { return v.GenerateSecret }).(pulumi.BoolOutput) 213 } 214 215 // The provider-assigned unique ID for this managed resource. 216 func (o LookupUserPoolClientResultOutput) Id() pulumi.StringOutput { 217 return o.ApplyT(func(v LookupUserPoolClientResult) string { return v.Id }).(pulumi.StringOutput) 218 } 219 220 // (Optional) Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used. This value will be overridden if you have entered a value in `tokenValidityUnits`. 221 func (o LookupUserPoolClientResultOutput) IdTokenValidity() pulumi.IntOutput { 222 return o.ApplyT(func(v LookupUserPoolClientResult) int { return v.IdTokenValidity }).(pulumi.IntOutput) 223 } 224 225 // (Optional) List of allowed logout URLs for the identity providers. 226 func (o LookupUserPoolClientResultOutput) LogoutUrls() pulumi.StringArrayOutput { 227 return o.ApplyT(func(v LookupUserPoolClientResult) []string { return v.LogoutUrls }).(pulumi.StringArrayOutput) 228 } 229 230 func (o LookupUserPoolClientResultOutput) Name() pulumi.StringOutput { 231 return o.ApplyT(func(v LookupUserPoolClientResult) string { return v.Name }).(pulumi.StringOutput) 232 } 233 234 // (Optional) Choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to `ENABLED` and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to `LEGACY`, those APIs will return a `UserNotFoundException` exception if the user does not exist in the user pool. 235 func (o LookupUserPoolClientResultOutput) PreventUserExistenceErrors() pulumi.StringOutput { 236 return o.ApplyT(func(v LookupUserPoolClientResult) string { return v.PreventUserExistenceErrors }).(pulumi.StringOutput) 237 } 238 239 // (Optional) List of user pool attributes the application client can read from. 240 func (o LookupUserPoolClientResultOutput) ReadAttributes() pulumi.StringArrayOutput { 241 return o.ApplyT(func(v LookupUserPoolClientResult) []string { return v.ReadAttributes }).(pulumi.StringArrayOutput) 242 } 243 244 // (Optional) Time limit in days refresh tokens are valid for. 245 func (o LookupUserPoolClientResultOutput) RefreshTokenValidity() pulumi.IntOutput { 246 return o.ApplyT(func(v LookupUserPoolClientResult) int { return v.RefreshTokenValidity }).(pulumi.IntOutput) 247 } 248 249 // (Optional) List of provider names for the identity providers that are supported on this client. Uses the `providerName` attribute of `cognito.IdentityProvider` resource(s), or the equivalent string(s). 250 func (o LookupUserPoolClientResultOutput) SupportedIdentityProviders() pulumi.StringArrayOutput { 251 return o.ApplyT(func(v LookupUserPoolClientResult) []string { return v.SupportedIdentityProviders }).(pulumi.StringArrayOutput) 252 } 253 254 // (Optional) Configuration block for units in which the validity times are represented in. Detailed below. 255 func (o LookupUserPoolClientResultOutput) TokenValidityUnits() GetUserPoolClientTokenValidityUnitArrayOutput { 256 return o.ApplyT(func(v LookupUserPoolClientResult) []GetUserPoolClientTokenValidityUnit { return v.TokenValidityUnits }).(GetUserPoolClientTokenValidityUnitArrayOutput) 257 } 258 259 func (o LookupUserPoolClientResultOutput) UserPoolId() pulumi.StringOutput { 260 return o.ApplyT(func(v LookupUserPoolClientResult) string { return v.UserPoolId }).(pulumi.StringOutput) 261 } 262 263 // (Optional) List of user pool attributes the application client can write to. 264 func (o LookupUserPoolClientResultOutput) WriteAttributes() pulumi.StringArrayOutput { 265 return o.ApplyT(func(v LookupUserPoolClientResult) []string { return v.WriteAttributes }).(pulumi.StringArrayOutput) 266 } 267 268 func init() { 269 pulumi.RegisterOutputType(LookupUserPoolClientResultOutput{}) 270 }