github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cognito/userPoolClient.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  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a Cognito User Pool Client resource.
    16  //
    17  // To manage a User Pool Client created by another service, such as when [configuring an OpenSearch Domain to use Cognito authentication](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html),
    18  // use the `cognito.ManagedUserPoolClient` resource instead.
    19  //
    20  // ## Example Usage
    21  //
    22  // ### Create a basic user pool client
    23  //
    24  // <!--Start PulumiCodeChooser -->
    25  // ```go
    26  // package main
    27  //
    28  // import (
    29  //
    30  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito"
    31  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    32  //
    33  // )
    34  //
    35  //	func main() {
    36  //		pulumi.Run(func(ctx *pulumi.Context) error {
    37  //			pool, err := cognito.NewUserPool(ctx, "pool", &cognito.UserPoolArgs{
    38  //				Name: pulumi.String("pool"),
    39  //			})
    40  //			if err != nil {
    41  //				return err
    42  //			}
    43  //			_, err = cognito.NewUserPoolClient(ctx, "client", &cognito.UserPoolClientArgs{
    44  //				Name:       pulumi.String("client"),
    45  //				UserPoolId: pool.ID(),
    46  //			})
    47  //			if err != nil {
    48  //				return err
    49  //			}
    50  //			return nil
    51  //		})
    52  //	}
    53  //
    54  // ```
    55  // <!--End PulumiCodeChooser -->
    56  //
    57  // ### Create a user pool client with no SRP authentication
    58  //
    59  // <!--Start PulumiCodeChooser -->
    60  // ```go
    61  // package main
    62  //
    63  // import (
    64  //
    65  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito"
    66  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    67  //
    68  // )
    69  //
    70  //	func main() {
    71  //		pulumi.Run(func(ctx *pulumi.Context) error {
    72  //			pool, err := cognito.NewUserPool(ctx, "pool", &cognito.UserPoolArgs{
    73  //				Name: pulumi.String("pool"),
    74  //			})
    75  //			if err != nil {
    76  //				return err
    77  //			}
    78  //			_, err = cognito.NewUserPoolClient(ctx, "client", &cognito.UserPoolClientArgs{
    79  //				Name:           pulumi.String("client"),
    80  //				UserPoolId:     pool.ID(),
    81  //				GenerateSecret: pulumi.Bool(true),
    82  //				ExplicitAuthFlows: pulumi.StringArray{
    83  //					pulumi.String("ADMIN_NO_SRP_AUTH"),
    84  //				},
    85  //			})
    86  //			if err != nil {
    87  //				return err
    88  //			}
    89  //			return nil
    90  //		})
    91  //	}
    92  //
    93  // ```
    94  // <!--End PulumiCodeChooser -->
    95  //
    96  // ### Create a user pool client with pinpoint analytics
    97  //
    98  // <!--Start PulumiCodeChooser -->
    99  // ```go
   100  // package main
   101  //
   102  // import (
   103  //
   104  //	"fmt"
   105  //
   106  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
   107  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito"
   108  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
   109  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pinpoint"
   110  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   111  //
   112  // )
   113  //
   114  //	func main() {
   115  //		pulumi.Run(func(ctx *pulumi.Context) error {
   116  //			testUserPool, err := cognito.NewUserPool(ctx, "test", &cognito.UserPoolArgs{
   117  //				Name: pulumi.String("pool"),
   118  //			})
   119  //			if err != nil {
   120  //				return err
   121  //			}
   122  //			testApp, err := pinpoint.NewApp(ctx, "test", &pinpoint.AppArgs{
   123  //				Name: pulumi.String("pinpoint"),
   124  //			})
   125  //			if err != nil {
   126  //				return err
   127  //			}
   128  //			assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
   129  //				Statements: []iam.GetPolicyDocumentStatement{
   130  //					{
   131  //						Effect: pulumi.StringRef("Allow"),
   132  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
   133  //							{
   134  //								Type: "Service",
   135  //								Identifiers: []string{
   136  //									"cognito-idp.amazonaws.com",
   137  //								},
   138  //							},
   139  //						},
   140  //						Actions: []string{
   141  //							"sts:AssumeRole",
   142  //						},
   143  //					},
   144  //				},
   145  //			}, nil)
   146  //			if err != nil {
   147  //				return err
   148  //			}
   149  //			testRole, err := iam.NewRole(ctx, "test", &iam.RoleArgs{
   150  //				Name:             pulumi.String("role"),
   151  //				AssumeRolePolicy: pulumi.String(assumeRole.Json),
   152  //			})
   153  //			if err != nil {
   154  //				return err
   155  //			}
   156  //			_, err = cognito.NewUserPoolClient(ctx, "test", &cognito.UserPoolClientArgs{
   157  //				Name:       pulumi.String("pool_client"),
   158  //				UserPoolId: testUserPool.ID(),
   159  //				AnalyticsConfiguration: &cognito.UserPoolClientAnalyticsConfigurationArgs{
   160  //					ApplicationId:  testApp.ApplicationId,
   161  //					ExternalId:     pulumi.String("some_id"),
   162  //					RoleArn:        testRole.Arn,
   163  //					UserDataShared: pulumi.Bool(true),
   164  //				},
   165  //			})
   166  //			if err != nil {
   167  //				return err
   168  //			}
   169  //			current, err := aws.GetCallerIdentity(ctx, nil, nil)
   170  //			if err != nil {
   171  //				return err
   172  //			}
   173  //			test := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{
   174  //				Statements: iam.GetPolicyDocumentStatementArray{
   175  //					&iam.GetPolicyDocumentStatementArgs{
   176  //						Effect: pulumi.String("Allow"),
   177  //						Actions: pulumi.StringArray{
   178  //							pulumi.String("mobiletargeting:UpdateEndpoint"),
   179  //							pulumi.String("mobiletargeting:PutEvents"),
   180  //						},
   181  //						Resources: pulumi.StringArray{
   182  //							testApp.ApplicationId.ApplyT(func(applicationId string) (string, error) {
   183  //								return fmt.Sprintf("arn:aws:mobiletargeting:*:%v:apps/%v*", current.AccountId, applicationId), nil
   184  //							}).(pulumi.StringOutput),
   185  //						},
   186  //					},
   187  //				},
   188  //			}, nil)
   189  //			_, err = iam.NewRolePolicy(ctx, "test", &iam.RolePolicyArgs{
   190  //				Name: pulumi.String("role_policy"),
   191  //				Role: testRole.ID(),
   192  //				Policy: test.ApplyT(func(test iam.GetPolicyDocumentResult) (*string, error) {
   193  //					return &test.Json, nil
   194  //				}).(pulumi.StringPtrOutput),
   195  //			})
   196  //			if err != nil {
   197  //				return err
   198  //			}
   199  //			return nil
   200  //		})
   201  //	}
   202  //
   203  // ```
   204  // <!--End PulumiCodeChooser -->
   205  //
   206  // ### Create a user pool client with Cognito as the identity provider
   207  //
   208  // <!--Start PulumiCodeChooser -->
   209  // ```go
   210  // package main
   211  //
   212  // import (
   213  //
   214  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito"
   215  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   216  //
   217  // )
   218  //
   219  //	func main() {
   220  //		pulumi.Run(func(ctx *pulumi.Context) error {
   221  //			pool, err := cognito.NewUserPool(ctx, "pool", &cognito.UserPoolArgs{
   222  //				Name: pulumi.String("pool"),
   223  //			})
   224  //			if err != nil {
   225  //				return err
   226  //			}
   227  //			_, err = cognito.NewUserPoolClient(ctx, "userpool_client", &cognito.UserPoolClientArgs{
   228  //				Name:       pulumi.String("client"),
   229  //				UserPoolId: pool.ID(),
   230  //				CallbackUrls: pulumi.StringArray{
   231  //					pulumi.String("https://example.com"),
   232  //				},
   233  //				AllowedOauthFlowsUserPoolClient: pulumi.Bool(true),
   234  //				AllowedOauthFlows: pulumi.StringArray{
   235  //					pulumi.String("code"),
   236  //					pulumi.String("implicit"),
   237  //				},
   238  //				AllowedOauthScopes: pulumi.StringArray{
   239  //					pulumi.String("email"),
   240  //					pulumi.String("openid"),
   241  //				},
   242  //				SupportedIdentityProviders: pulumi.StringArray{
   243  //					pulumi.String("COGNITO"),
   244  //				},
   245  //			})
   246  //			if err != nil {
   247  //				return err
   248  //			}
   249  //			return nil
   250  //		})
   251  //	}
   252  //
   253  // ```
   254  // <!--End PulumiCodeChooser -->
   255  //
   256  // ## Import
   257  //
   258  // Using `pulumi import`, import Cognito User Pool Clients using the `id` of the Cognito User Pool, and the `id` of the Cognito User Pool Client. For example:
   259  //
   260  // ```sh
   261  // $ pulumi import aws:cognito/userPoolClient:UserPoolClient client us-west-2_abc123/3ho4ek12345678909nh3fmhpko
   262  // ```
   263  type UserPoolClient struct {
   264  	pulumi.CustomResourceState
   265  
   266  	// Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used.
   267  	// By default, the unit is hours.
   268  	// The unit can be overridden by a value in `token_validity_units.access_token`.
   269  	AccessTokenValidity pulumi.IntOutput `pulumi:"accessTokenValidity"`
   270  	// List of allowed OAuth flows (code, implicit, client_credentials).
   271  	AllowedOauthFlows pulumi.StringArrayOutput `pulumi:"allowedOauthFlows"`
   272  	// Whether the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
   273  	AllowedOauthFlowsUserPoolClient pulumi.BoolOutput `pulumi:"allowedOauthFlowsUserPoolClient"`
   274  	// List of allowed OAuth scopes (phone, email, openid, profile, and aws.cognito.signin.user.admin).
   275  	AllowedOauthScopes pulumi.StringArrayOutput `pulumi:"allowedOauthScopes"`
   276  	// Configuration block for Amazon Pinpoint analytics for collecting metrics for this user pool. Detailed below.
   277  	AnalyticsConfiguration UserPoolClientAnalyticsConfigurationPtrOutput `pulumi:"analyticsConfiguration"`
   278  	// Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration, in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires. Valid values between `3` and `15`. Default value is `3`.
   279  	AuthSessionValidity pulumi.IntOutput `pulumi:"authSessionValidity"`
   280  	// List of allowed callback URLs for the identity providers.
   281  	CallbackUrls pulumi.StringArrayOutput `pulumi:"callbackUrls"`
   282  	// Client secret of the user pool client.
   283  	ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
   284  	// Default redirect URI. Must be in the list of callback URLs.
   285  	DefaultRedirectUri pulumi.StringOutput `pulumi:"defaultRedirectUri"`
   286  	// Activates the propagation of additional user context data.
   287  	EnablePropagateAdditionalUserContextData pulumi.BoolOutput `pulumi:"enablePropagateAdditionalUserContextData"`
   288  	// Enables or disables token revocation.
   289  	EnableTokenRevocation pulumi.BoolOutput `pulumi:"enableTokenRevocation"`
   290  	// 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).
   291  	ExplicitAuthFlows pulumi.StringArrayOutput `pulumi:"explicitAuthFlows"`
   292  	// Should an application secret be generated.
   293  	GenerateSecret pulumi.BoolPtrOutput `pulumi:"generateSecret"`
   294  	// Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used.
   295  	// By default, the unit is hours.
   296  	// The unit can be overridden by a value in `token_validity_units.id_token`.
   297  	IdTokenValidity pulumi.IntOutput `pulumi:"idTokenValidity"`
   298  	// List of allowed logout URLs for the identity providers.
   299  	LogoutUrls pulumi.StringArrayOutput `pulumi:"logoutUrls"`
   300  	// Name of the application client.
   301  	Name pulumi.StringOutput `pulumi:"name"`
   302  	// 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.
   303  	PreventUserExistenceErrors pulumi.StringOutput `pulumi:"preventUserExistenceErrors"`
   304  	// List of user pool attributes the application client can read from.
   305  	ReadAttributes pulumi.StringArrayOutput `pulumi:"readAttributes"`
   306  	// Time limit, between 60 minutes and 10 years, after which the refresh token is no longer valid and cannot be used.
   307  	// By default, the unit is days.
   308  	// The unit can be overridden by a value in `token_validity_units.refresh_token`.
   309  	RefreshTokenValidity pulumi.IntOutput `pulumi:"refreshTokenValidity"`
   310  	// 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).
   311  	SupportedIdentityProviders pulumi.StringArrayOutput `pulumi:"supportedIdentityProviders"`
   312  	// Configuration block for units in which the validity times are represented in. Detailed below.
   313  	TokenValidityUnits UserPoolClientTokenValidityUnitsPtrOutput `pulumi:"tokenValidityUnits"`
   314  	// User pool the client belongs to.
   315  	//
   316  	// The following arguments are optional:
   317  	UserPoolId pulumi.StringOutput `pulumi:"userPoolId"`
   318  	// List of user pool attributes the application client can write to.
   319  	WriteAttributes pulumi.StringArrayOutput `pulumi:"writeAttributes"`
   320  }
   321  
   322  // NewUserPoolClient registers a new resource with the given unique name, arguments, and options.
   323  func NewUserPoolClient(ctx *pulumi.Context,
   324  	name string, args *UserPoolClientArgs, opts ...pulumi.ResourceOption) (*UserPoolClient, error) {
   325  	if args == nil {
   326  		return nil, errors.New("missing one or more required arguments")
   327  	}
   328  
   329  	if args.UserPoolId == nil {
   330  		return nil, errors.New("invalid value for required argument 'UserPoolId'")
   331  	}
   332  	secrets := pulumi.AdditionalSecretOutputs([]string{
   333  		"clientSecret",
   334  	})
   335  	opts = append(opts, secrets)
   336  	opts = internal.PkgResourceDefaultOpts(opts)
   337  	var resource UserPoolClient
   338  	err := ctx.RegisterResource("aws:cognito/userPoolClient:UserPoolClient", name, args, &resource, opts...)
   339  	if err != nil {
   340  		return nil, err
   341  	}
   342  	return &resource, nil
   343  }
   344  
   345  // GetUserPoolClient gets an existing UserPoolClient resource's state with the given name, ID, and optional
   346  // state properties that are used to uniquely qualify the lookup (nil if not required).
   347  func GetUserPoolClient(ctx *pulumi.Context,
   348  	name string, id pulumi.IDInput, state *UserPoolClientState, opts ...pulumi.ResourceOption) (*UserPoolClient, error) {
   349  	var resource UserPoolClient
   350  	err := ctx.ReadResource("aws:cognito/userPoolClient:UserPoolClient", name, id, state, &resource, opts...)
   351  	if err != nil {
   352  		return nil, err
   353  	}
   354  	return &resource, nil
   355  }
   356  
   357  // Input properties used for looking up and filtering UserPoolClient resources.
   358  type userPoolClientState struct {
   359  	// Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used.
   360  	// By default, the unit is hours.
   361  	// The unit can be overridden by a value in `token_validity_units.access_token`.
   362  	AccessTokenValidity *int `pulumi:"accessTokenValidity"`
   363  	// List of allowed OAuth flows (code, implicit, client_credentials).
   364  	AllowedOauthFlows []string `pulumi:"allowedOauthFlows"`
   365  	// Whether the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
   366  	AllowedOauthFlowsUserPoolClient *bool `pulumi:"allowedOauthFlowsUserPoolClient"`
   367  	// List of allowed OAuth scopes (phone, email, openid, profile, and aws.cognito.signin.user.admin).
   368  	AllowedOauthScopes []string `pulumi:"allowedOauthScopes"`
   369  	// Configuration block for Amazon Pinpoint analytics for collecting metrics for this user pool. Detailed below.
   370  	AnalyticsConfiguration *UserPoolClientAnalyticsConfiguration `pulumi:"analyticsConfiguration"`
   371  	// Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration, in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires. Valid values between `3` and `15`. Default value is `3`.
   372  	AuthSessionValidity *int `pulumi:"authSessionValidity"`
   373  	// List of allowed callback URLs for the identity providers.
   374  	CallbackUrls []string `pulumi:"callbackUrls"`
   375  	// Client secret of the user pool client.
   376  	ClientSecret *string `pulumi:"clientSecret"`
   377  	// Default redirect URI. Must be in the list of callback URLs.
   378  	DefaultRedirectUri *string `pulumi:"defaultRedirectUri"`
   379  	// Activates the propagation of additional user context data.
   380  	EnablePropagateAdditionalUserContextData *bool `pulumi:"enablePropagateAdditionalUserContextData"`
   381  	// Enables or disables token revocation.
   382  	EnableTokenRevocation *bool `pulumi:"enableTokenRevocation"`
   383  	// 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).
   384  	ExplicitAuthFlows []string `pulumi:"explicitAuthFlows"`
   385  	// Should an application secret be generated.
   386  	GenerateSecret *bool `pulumi:"generateSecret"`
   387  	// Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used.
   388  	// By default, the unit is hours.
   389  	// The unit can be overridden by a value in `token_validity_units.id_token`.
   390  	IdTokenValidity *int `pulumi:"idTokenValidity"`
   391  	// List of allowed logout URLs for the identity providers.
   392  	LogoutUrls []string `pulumi:"logoutUrls"`
   393  	// Name of the application client.
   394  	Name *string `pulumi:"name"`
   395  	// 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.
   396  	PreventUserExistenceErrors *string `pulumi:"preventUserExistenceErrors"`
   397  	// List of user pool attributes the application client can read from.
   398  	ReadAttributes []string `pulumi:"readAttributes"`
   399  	// Time limit, between 60 minutes and 10 years, after which the refresh token is no longer valid and cannot be used.
   400  	// By default, the unit is days.
   401  	// The unit can be overridden by a value in `token_validity_units.refresh_token`.
   402  	RefreshTokenValidity *int `pulumi:"refreshTokenValidity"`
   403  	// 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).
   404  	SupportedIdentityProviders []string `pulumi:"supportedIdentityProviders"`
   405  	// Configuration block for units in which the validity times are represented in. Detailed below.
   406  	TokenValidityUnits *UserPoolClientTokenValidityUnits `pulumi:"tokenValidityUnits"`
   407  	// User pool the client belongs to.
   408  	//
   409  	// The following arguments are optional:
   410  	UserPoolId *string `pulumi:"userPoolId"`
   411  	// List of user pool attributes the application client can write to.
   412  	WriteAttributes []string `pulumi:"writeAttributes"`
   413  }
   414  
   415  type UserPoolClientState struct {
   416  	// Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used.
   417  	// By default, the unit is hours.
   418  	// The unit can be overridden by a value in `token_validity_units.access_token`.
   419  	AccessTokenValidity pulumi.IntPtrInput
   420  	// List of allowed OAuth flows (code, implicit, client_credentials).
   421  	AllowedOauthFlows pulumi.StringArrayInput
   422  	// Whether the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
   423  	AllowedOauthFlowsUserPoolClient pulumi.BoolPtrInput
   424  	// List of allowed OAuth scopes (phone, email, openid, profile, and aws.cognito.signin.user.admin).
   425  	AllowedOauthScopes pulumi.StringArrayInput
   426  	// Configuration block for Amazon Pinpoint analytics for collecting metrics for this user pool. Detailed below.
   427  	AnalyticsConfiguration UserPoolClientAnalyticsConfigurationPtrInput
   428  	// Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration, in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires. Valid values between `3` and `15`. Default value is `3`.
   429  	AuthSessionValidity pulumi.IntPtrInput
   430  	// List of allowed callback URLs for the identity providers.
   431  	CallbackUrls pulumi.StringArrayInput
   432  	// Client secret of the user pool client.
   433  	ClientSecret pulumi.StringPtrInput
   434  	// Default redirect URI. Must be in the list of callback URLs.
   435  	DefaultRedirectUri pulumi.StringPtrInput
   436  	// Activates the propagation of additional user context data.
   437  	EnablePropagateAdditionalUserContextData pulumi.BoolPtrInput
   438  	// Enables or disables token revocation.
   439  	EnableTokenRevocation pulumi.BoolPtrInput
   440  	// 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).
   441  	ExplicitAuthFlows pulumi.StringArrayInput
   442  	// Should an application secret be generated.
   443  	GenerateSecret pulumi.BoolPtrInput
   444  	// Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used.
   445  	// By default, the unit is hours.
   446  	// The unit can be overridden by a value in `token_validity_units.id_token`.
   447  	IdTokenValidity pulumi.IntPtrInput
   448  	// List of allowed logout URLs for the identity providers.
   449  	LogoutUrls pulumi.StringArrayInput
   450  	// Name of the application client.
   451  	Name pulumi.StringPtrInput
   452  	// 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.
   453  	PreventUserExistenceErrors pulumi.StringPtrInput
   454  	// List of user pool attributes the application client can read from.
   455  	ReadAttributes pulumi.StringArrayInput
   456  	// Time limit, between 60 minutes and 10 years, after which the refresh token is no longer valid and cannot be used.
   457  	// By default, the unit is days.
   458  	// The unit can be overridden by a value in `token_validity_units.refresh_token`.
   459  	RefreshTokenValidity pulumi.IntPtrInput
   460  	// 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).
   461  	SupportedIdentityProviders pulumi.StringArrayInput
   462  	// Configuration block for units in which the validity times are represented in. Detailed below.
   463  	TokenValidityUnits UserPoolClientTokenValidityUnitsPtrInput
   464  	// User pool the client belongs to.
   465  	//
   466  	// The following arguments are optional:
   467  	UserPoolId pulumi.StringPtrInput
   468  	// List of user pool attributes the application client can write to.
   469  	WriteAttributes pulumi.StringArrayInput
   470  }
   471  
   472  func (UserPoolClientState) ElementType() reflect.Type {
   473  	return reflect.TypeOf((*userPoolClientState)(nil)).Elem()
   474  }
   475  
   476  type userPoolClientArgs struct {
   477  	// Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used.
   478  	// By default, the unit is hours.
   479  	// The unit can be overridden by a value in `token_validity_units.access_token`.
   480  	AccessTokenValidity *int `pulumi:"accessTokenValidity"`
   481  	// List of allowed OAuth flows (code, implicit, client_credentials).
   482  	AllowedOauthFlows []string `pulumi:"allowedOauthFlows"`
   483  	// Whether the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
   484  	AllowedOauthFlowsUserPoolClient *bool `pulumi:"allowedOauthFlowsUserPoolClient"`
   485  	// List of allowed OAuth scopes (phone, email, openid, profile, and aws.cognito.signin.user.admin).
   486  	AllowedOauthScopes []string `pulumi:"allowedOauthScopes"`
   487  	// Configuration block for Amazon Pinpoint analytics for collecting metrics for this user pool. Detailed below.
   488  	AnalyticsConfiguration *UserPoolClientAnalyticsConfiguration `pulumi:"analyticsConfiguration"`
   489  	// Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration, in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires. Valid values between `3` and `15`. Default value is `3`.
   490  	AuthSessionValidity *int `pulumi:"authSessionValidity"`
   491  	// List of allowed callback URLs for the identity providers.
   492  	CallbackUrls []string `pulumi:"callbackUrls"`
   493  	// Default redirect URI. Must be in the list of callback URLs.
   494  	DefaultRedirectUri *string `pulumi:"defaultRedirectUri"`
   495  	// Activates the propagation of additional user context data.
   496  	EnablePropagateAdditionalUserContextData *bool `pulumi:"enablePropagateAdditionalUserContextData"`
   497  	// Enables or disables token revocation.
   498  	EnableTokenRevocation *bool `pulumi:"enableTokenRevocation"`
   499  	// 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).
   500  	ExplicitAuthFlows []string `pulumi:"explicitAuthFlows"`
   501  	// Should an application secret be generated.
   502  	GenerateSecret *bool `pulumi:"generateSecret"`
   503  	// Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used.
   504  	// By default, the unit is hours.
   505  	// The unit can be overridden by a value in `token_validity_units.id_token`.
   506  	IdTokenValidity *int `pulumi:"idTokenValidity"`
   507  	// List of allowed logout URLs for the identity providers.
   508  	LogoutUrls []string `pulumi:"logoutUrls"`
   509  	// Name of the application client.
   510  	Name *string `pulumi:"name"`
   511  	// 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.
   512  	PreventUserExistenceErrors *string `pulumi:"preventUserExistenceErrors"`
   513  	// List of user pool attributes the application client can read from.
   514  	ReadAttributes []string `pulumi:"readAttributes"`
   515  	// Time limit, between 60 minutes and 10 years, after which the refresh token is no longer valid and cannot be used.
   516  	// By default, the unit is days.
   517  	// The unit can be overridden by a value in `token_validity_units.refresh_token`.
   518  	RefreshTokenValidity *int `pulumi:"refreshTokenValidity"`
   519  	// 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).
   520  	SupportedIdentityProviders []string `pulumi:"supportedIdentityProviders"`
   521  	// Configuration block for units in which the validity times are represented in. Detailed below.
   522  	TokenValidityUnits *UserPoolClientTokenValidityUnits `pulumi:"tokenValidityUnits"`
   523  	// User pool the client belongs to.
   524  	//
   525  	// The following arguments are optional:
   526  	UserPoolId string `pulumi:"userPoolId"`
   527  	// List of user pool attributes the application client can write to.
   528  	WriteAttributes []string `pulumi:"writeAttributes"`
   529  }
   530  
   531  // The set of arguments for constructing a UserPoolClient resource.
   532  type UserPoolClientArgs struct {
   533  	// Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used.
   534  	// By default, the unit is hours.
   535  	// The unit can be overridden by a value in `token_validity_units.access_token`.
   536  	AccessTokenValidity pulumi.IntPtrInput
   537  	// List of allowed OAuth flows (code, implicit, client_credentials).
   538  	AllowedOauthFlows pulumi.StringArrayInput
   539  	// Whether the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
   540  	AllowedOauthFlowsUserPoolClient pulumi.BoolPtrInput
   541  	// List of allowed OAuth scopes (phone, email, openid, profile, and aws.cognito.signin.user.admin).
   542  	AllowedOauthScopes pulumi.StringArrayInput
   543  	// Configuration block for Amazon Pinpoint analytics for collecting metrics for this user pool. Detailed below.
   544  	AnalyticsConfiguration UserPoolClientAnalyticsConfigurationPtrInput
   545  	// Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration, in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires. Valid values between `3` and `15`. Default value is `3`.
   546  	AuthSessionValidity pulumi.IntPtrInput
   547  	// List of allowed callback URLs for the identity providers.
   548  	CallbackUrls pulumi.StringArrayInput
   549  	// Default redirect URI. Must be in the list of callback URLs.
   550  	DefaultRedirectUri pulumi.StringPtrInput
   551  	// Activates the propagation of additional user context data.
   552  	EnablePropagateAdditionalUserContextData pulumi.BoolPtrInput
   553  	// Enables or disables token revocation.
   554  	EnableTokenRevocation pulumi.BoolPtrInput
   555  	// 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).
   556  	ExplicitAuthFlows pulumi.StringArrayInput
   557  	// Should an application secret be generated.
   558  	GenerateSecret pulumi.BoolPtrInput
   559  	// Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used.
   560  	// By default, the unit is hours.
   561  	// The unit can be overridden by a value in `token_validity_units.id_token`.
   562  	IdTokenValidity pulumi.IntPtrInput
   563  	// List of allowed logout URLs for the identity providers.
   564  	LogoutUrls pulumi.StringArrayInput
   565  	// Name of the application client.
   566  	Name pulumi.StringPtrInput
   567  	// 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.
   568  	PreventUserExistenceErrors pulumi.StringPtrInput
   569  	// List of user pool attributes the application client can read from.
   570  	ReadAttributes pulumi.StringArrayInput
   571  	// Time limit, between 60 minutes and 10 years, after which the refresh token is no longer valid and cannot be used.
   572  	// By default, the unit is days.
   573  	// The unit can be overridden by a value in `token_validity_units.refresh_token`.
   574  	RefreshTokenValidity pulumi.IntPtrInput
   575  	// 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).
   576  	SupportedIdentityProviders pulumi.StringArrayInput
   577  	// Configuration block for units in which the validity times are represented in. Detailed below.
   578  	TokenValidityUnits UserPoolClientTokenValidityUnitsPtrInput
   579  	// User pool the client belongs to.
   580  	//
   581  	// The following arguments are optional:
   582  	UserPoolId pulumi.StringInput
   583  	// List of user pool attributes the application client can write to.
   584  	WriteAttributes pulumi.StringArrayInput
   585  }
   586  
   587  func (UserPoolClientArgs) ElementType() reflect.Type {
   588  	return reflect.TypeOf((*userPoolClientArgs)(nil)).Elem()
   589  }
   590  
   591  type UserPoolClientInput interface {
   592  	pulumi.Input
   593  
   594  	ToUserPoolClientOutput() UserPoolClientOutput
   595  	ToUserPoolClientOutputWithContext(ctx context.Context) UserPoolClientOutput
   596  }
   597  
   598  func (*UserPoolClient) ElementType() reflect.Type {
   599  	return reflect.TypeOf((**UserPoolClient)(nil)).Elem()
   600  }
   601  
   602  func (i *UserPoolClient) ToUserPoolClientOutput() UserPoolClientOutput {
   603  	return i.ToUserPoolClientOutputWithContext(context.Background())
   604  }
   605  
   606  func (i *UserPoolClient) ToUserPoolClientOutputWithContext(ctx context.Context) UserPoolClientOutput {
   607  	return pulumi.ToOutputWithContext(ctx, i).(UserPoolClientOutput)
   608  }
   609  
   610  // UserPoolClientArrayInput is an input type that accepts UserPoolClientArray and UserPoolClientArrayOutput values.
   611  // You can construct a concrete instance of `UserPoolClientArrayInput` via:
   612  //
   613  //	UserPoolClientArray{ UserPoolClientArgs{...} }
   614  type UserPoolClientArrayInput interface {
   615  	pulumi.Input
   616  
   617  	ToUserPoolClientArrayOutput() UserPoolClientArrayOutput
   618  	ToUserPoolClientArrayOutputWithContext(context.Context) UserPoolClientArrayOutput
   619  }
   620  
   621  type UserPoolClientArray []UserPoolClientInput
   622  
   623  func (UserPoolClientArray) ElementType() reflect.Type {
   624  	return reflect.TypeOf((*[]*UserPoolClient)(nil)).Elem()
   625  }
   626  
   627  func (i UserPoolClientArray) ToUserPoolClientArrayOutput() UserPoolClientArrayOutput {
   628  	return i.ToUserPoolClientArrayOutputWithContext(context.Background())
   629  }
   630  
   631  func (i UserPoolClientArray) ToUserPoolClientArrayOutputWithContext(ctx context.Context) UserPoolClientArrayOutput {
   632  	return pulumi.ToOutputWithContext(ctx, i).(UserPoolClientArrayOutput)
   633  }
   634  
   635  // UserPoolClientMapInput is an input type that accepts UserPoolClientMap and UserPoolClientMapOutput values.
   636  // You can construct a concrete instance of `UserPoolClientMapInput` via:
   637  //
   638  //	UserPoolClientMap{ "key": UserPoolClientArgs{...} }
   639  type UserPoolClientMapInput interface {
   640  	pulumi.Input
   641  
   642  	ToUserPoolClientMapOutput() UserPoolClientMapOutput
   643  	ToUserPoolClientMapOutputWithContext(context.Context) UserPoolClientMapOutput
   644  }
   645  
   646  type UserPoolClientMap map[string]UserPoolClientInput
   647  
   648  func (UserPoolClientMap) ElementType() reflect.Type {
   649  	return reflect.TypeOf((*map[string]*UserPoolClient)(nil)).Elem()
   650  }
   651  
   652  func (i UserPoolClientMap) ToUserPoolClientMapOutput() UserPoolClientMapOutput {
   653  	return i.ToUserPoolClientMapOutputWithContext(context.Background())
   654  }
   655  
   656  func (i UserPoolClientMap) ToUserPoolClientMapOutputWithContext(ctx context.Context) UserPoolClientMapOutput {
   657  	return pulumi.ToOutputWithContext(ctx, i).(UserPoolClientMapOutput)
   658  }
   659  
   660  type UserPoolClientOutput struct{ *pulumi.OutputState }
   661  
   662  func (UserPoolClientOutput) ElementType() reflect.Type {
   663  	return reflect.TypeOf((**UserPoolClient)(nil)).Elem()
   664  }
   665  
   666  func (o UserPoolClientOutput) ToUserPoolClientOutput() UserPoolClientOutput {
   667  	return o
   668  }
   669  
   670  func (o UserPoolClientOutput) ToUserPoolClientOutputWithContext(ctx context.Context) UserPoolClientOutput {
   671  	return o
   672  }
   673  
   674  // Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used.
   675  // By default, the unit is hours.
   676  // The unit can be overridden by a value in `token_validity_units.access_token`.
   677  func (o UserPoolClientOutput) AccessTokenValidity() pulumi.IntOutput {
   678  	return o.ApplyT(func(v *UserPoolClient) pulumi.IntOutput { return v.AccessTokenValidity }).(pulumi.IntOutput)
   679  }
   680  
   681  // List of allowed OAuth flows (code, implicit, client_credentials).
   682  func (o UserPoolClientOutput) AllowedOauthFlows() pulumi.StringArrayOutput {
   683  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringArrayOutput { return v.AllowedOauthFlows }).(pulumi.StringArrayOutput)
   684  }
   685  
   686  // Whether the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
   687  func (o UserPoolClientOutput) AllowedOauthFlowsUserPoolClient() pulumi.BoolOutput {
   688  	return o.ApplyT(func(v *UserPoolClient) pulumi.BoolOutput { return v.AllowedOauthFlowsUserPoolClient }).(pulumi.BoolOutput)
   689  }
   690  
   691  // List of allowed OAuth scopes (phone, email, openid, profile, and aws.cognito.signin.user.admin).
   692  func (o UserPoolClientOutput) AllowedOauthScopes() pulumi.StringArrayOutput {
   693  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringArrayOutput { return v.AllowedOauthScopes }).(pulumi.StringArrayOutput)
   694  }
   695  
   696  // Configuration block for Amazon Pinpoint analytics for collecting metrics for this user pool. Detailed below.
   697  func (o UserPoolClientOutput) AnalyticsConfiguration() UserPoolClientAnalyticsConfigurationPtrOutput {
   698  	return o.ApplyT(func(v *UserPoolClient) UserPoolClientAnalyticsConfigurationPtrOutput { return v.AnalyticsConfiguration }).(UserPoolClientAnalyticsConfigurationPtrOutput)
   699  }
   700  
   701  // Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration, in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires. Valid values between `3` and `15`. Default value is `3`.
   702  func (o UserPoolClientOutput) AuthSessionValidity() pulumi.IntOutput {
   703  	return o.ApplyT(func(v *UserPoolClient) pulumi.IntOutput { return v.AuthSessionValidity }).(pulumi.IntOutput)
   704  }
   705  
   706  // List of allowed callback URLs for the identity providers.
   707  func (o UserPoolClientOutput) CallbackUrls() pulumi.StringArrayOutput {
   708  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringArrayOutput { return v.CallbackUrls }).(pulumi.StringArrayOutput)
   709  }
   710  
   711  // Client secret of the user pool client.
   712  func (o UserPoolClientOutput) ClientSecret() pulumi.StringOutput {
   713  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
   714  }
   715  
   716  // Default redirect URI. Must be in the list of callback URLs.
   717  func (o UserPoolClientOutput) DefaultRedirectUri() pulumi.StringOutput {
   718  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringOutput { return v.DefaultRedirectUri }).(pulumi.StringOutput)
   719  }
   720  
   721  // Activates the propagation of additional user context data.
   722  func (o UserPoolClientOutput) EnablePropagateAdditionalUserContextData() pulumi.BoolOutput {
   723  	return o.ApplyT(func(v *UserPoolClient) pulumi.BoolOutput { return v.EnablePropagateAdditionalUserContextData }).(pulumi.BoolOutput)
   724  }
   725  
   726  // Enables or disables token revocation.
   727  func (o UserPoolClientOutput) EnableTokenRevocation() pulumi.BoolOutput {
   728  	return o.ApplyT(func(v *UserPoolClient) pulumi.BoolOutput { return v.EnableTokenRevocation }).(pulumi.BoolOutput)
   729  }
   730  
   731  // 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).
   732  func (o UserPoolClientOutput) ExplicitAuthFlows() pulumi.StringArrayOutput {
   733  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringArrayOutput { return v.ExplicitAuthFlows }).(pulumi.StringArrayOutput)
   734  }
   735  
   736  // Should an application secret be generated.
   737  func (o UserPoolClientOutput) GenerateSecret() pulumi.BoolPtrOutput {
   738  	return o.ApplyT(func(v *UserPoolClient) pulumi.BoolPtrOutput { return v.GenerateSecret }).(pulumi.BoolPtrOutput)
   739  }
   740  
   741  // Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used.
   742  // By default, the unit is hours.
   743  // The unit can be overridden by a value in `token_validity_units.id_token`.
   744  func (o UserPoolClientOutput) IdTokenValidity() pulumi.IntOutput {
   745  	return o.ApplyT(func(v *UserPoolClient) pulumi.IntOutput { return v.IdTokenValidity }).(pulumi.IntOutput)
   746  }
   747  
   748  // List of allowed logout URLs for the identity providers.
   749  func (o UserPoolClientOutput) LogoutUrls() pulumi.StringArrayOutput {
   750  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringArrayOutput { return v.LogoutUrls }).(pulumi.StringArrayOutput)
   751  }
   752  
   753  // Name of the application client.
   754  func (o UserPoolClientOutput) Name() pulumi.StringOutput {
   755  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   756  }
   757  
   758  // 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.
   759  func (o UserPoolClientOutput) PreventUserExistenceErrors() pulumi.StringOutput {
   760  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringOutput { return v.PreventUserExistenceErrors }).(pulumi.StringOutput)
   761  }
   762  
   763  // List of user pool attributes the application client can read from.
   764  func (o UserPoolClientOutput) ReadAttributes() pulumi.StringArrayOutput {
   765  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringArrayOutput { return v.ReadAttributes }).(pulumi.StringArrayOutput)
   766  }
   767  
   768  // Time limit, between 60 minutes and 10 years, after which the refresh token is no longer valid and cannot be used.
   769  // By default, the unit is days.
   770  // The unit can be overridden by a value in `token_validity_units.refresh_token`.
   771  func (o UserPoolClientOutput) RefreshTokenValidity() pulumi.IntOutput {
   772  	return o.ApplyT(func(v *UserPoolClient) pulumi.IntOutput { return v.RefreshTokenValidity }).(pulumi.IntOutput)
   773  }
   774  
   775  // 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).
   776  func (o UserPoolClientOutput) SupportedIdentityProviders() pulumi.StringArrayOutput {
   777  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringArrayOutput { return v.SupportedIdentityProviders }).(pulumi.StringArrayOutput)
   778  }
   779  
   780  // Configuration block for units in which the validity times are represented in. Detailed below.
   781  func (o UserPoolClientOutput) TokenValidityUnits() UserPoolClientTokenValidityUnitsPtrOutput {
   782  	return o.ApplyT(func(v *UserPoolClient) UserPoolClientTokenValidityUnitsPtrOutput { return v.TokenValidityUnits }).(UserPoolClientTokenValidityUnitsPtrOutput)
   783  }
   784  
   785  // User pool the client belongs to.
   786  //
   787  // The following arguments are optional:
   788  func (o UserPoolClientOutput) UserPoolId() pulumi.StringOutput {
   789  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringOutput { return v.UserPoolId }).(pulumi.StringOutput)
   790  }
   791  
   792  // List of user pool attributes the application client can write to.
   793  func (o UserPoolClientOutput) WriteAttributes() pulumi.StringArrayOutput {
   794  	return o.ApplyT(func(v *UserPoolClient) pulumi.StringArrayOutput { return v.WriteAttributes }).(pulumi.StringArrayOutput)
   795  }
   796  
   797  type UserPoolClientArrayOutput struct{ *pulumi.OutputState }
   798  
   799  func (UserPoolClientArrayOutput) ElementType() reflect.Type {
   800  	return reflect.TypeOf((*[]*UserPoolClient)(nil)).Elem()
   801  }
   802  
   803  func (o UserPoolClientArrayOutput) ToUserPoolClientArrayOutput() UserPoolClientArrayOutput {
   804  	return o
   805  }
   806  
   807  func (o UserPoolClientArrayOutput) ToUserPoolClientArrayOutputWithContext(ctx context.Context) UserPoolClientArrayOutput {
   808  	return o
   809  }
   810  
   811  func (o UserPoolClientArrayOutput) Index(i pulumi.IntInput) UserPoolClientOutput {
   812  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *UserPoolClient {
   813  		return vs[0].([]*UserPoolClient)[vs[1].(int)]
   814  	}).(UserPoolClientOutput)
   815  }
   816  
   817  type UserPoolClientMapOutput struct{ *pulumi.OutputState }
   818  
   819  func (UserPoolClientMapOutput) ElementType() reflect.Type {
   820  	return reflect.TypeOf((*map[string]*UserPoolClient)(nil)).Elem()
   821  }
   822  
   823  func (o UserPoolClientMapOutput) ToUserPoolClientMapOutput() UserPoolClientMapOutput {
   824  	return o
   825  }
   826  
   827  func (o UserPoolClientMapOutput) ToUserPoolClientMapOutputWithContext(ctx context.Context) UserPoolClientMapOutput {
   828  	return o
   829  }
   830  
   831  func (o UserPoolClientMapOutput) MapIndex(k pulumi.StringInput) UserPoolClientOutput {
   832  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *UserPoolClient {
   833  		return vs[0].(map[string]*UserPoolClient)[vs[1].(string)]
   834  	}).(UserPoolClientOutput)
   835  }
   836  
   837  func init() {
   838  	pulumi.RegisterInputType(reflect.TypeOf((*UserPoolClientInput)(nil)).Elem(), &UserPoolClient{})
   839  	pulumi.RegisterInputType(reflect.TypeOf((*UserPoolClientArrayInput)(nil)).Elem(), UserPoolClientArray{})
   840  	pulumi.RegisterInputType(reflect.TypeOf((*UserPoolClientMapInput)(nil)).Elem(), UserPoolClientMap{})
   841  	pulumi.RegisterOutputType(UserPoolClientOutput{})
   842  	pulumi.RegisterOutputType(UserPoolClientArrayOutput{})
   843  	pulumi.RegisterOutputType(UserPoolClientMapOutput{})
   844  }