github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cognito/user.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 Resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic configuration
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			example, err := cognito.NewUserPool(ctx, "example", &cognito.UserPoolArgs{
    35  //				Name: pulumi.String("MyExamplePool"),
    36  //			})
    37  //			if err != nil {
    38  //				return err
    39  //			}
    40  //			_, err = cognito.NewUser(ctx, "example", &cognito.UserArgs{
    41  //				UserPoolId: example.ID(),
    42  //				Username:   pulumi.String("example"),
    43  //			})
    44  //			if err != nil {
    45  //				return err
    46  //			}
    47  //			return nil
    48  //		})
    49  //	}
    50  //
    51  // ```
    52  // <!--End PulumiCodeChooser -->
    53  //
    54  // ### Setting user attributes
    55  //
    56  // <!--Start PulumiCodeChooser -->
    57  // ```go
    58  // package main
    59  //
    60  // import (
    61  //
    62  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito"
    63  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    64  //
    65  // )
    66  //
    67  //	func main() {
    68  //		pulumi.Run(func(ctx *pulumi.Context) error {
    69  //			example, err := cognito.NewUserPool(ctx, "example", &cognito.UserPoolArgs{
    70  //				Name: pulumi.String("mypool"),
    71  //				Schemas: cognito.UserPoolSchemaArray{
    72  //					&cognito.UserPoolSchemaArgs{
    73  //						Name:                   pulumi.String("example"),
    74  //						AttributeDataType:      pulumi.String("Boolean"),
    75  //						Mutable:                pulumi.Bool(false),
    76  //						Required:               pulumi.Bool(false),
    77  //						DeveloperOnlyAttribute: pulumi.Bool(false),
    78  //					},
    79  //					&cognito.UserPoolSchemaArgs{
    80  //						Name:                       pulumi.String("foo"),
    81  //						AttributeDataType:          pulumi.String("String"),
    82  //						Mutable:                    pulumi.Bool(false),
    83  //						Required:                   pulumi.Bool(false),
    84  //						DeveloperOnlyAttribute:     pulumi.Bool(false),
    85  //						StringAttributeConstraints: nil,
    86  //					},
    87  //				},
    88  //			})
    89  //			if err != nil {
    90  //				return err
    91  //			}
    92  //			_, err = cognito.NewUser(ctx, "example", &cognito.UserArgs{
    93  //				UserPoolId: example.ID(),
    94  //				Username:   pulumi.String("example"),
    95  //				Attributes: pulumi.StringMap{
    96  //					"example":        pulumi.String("true"),
    97  //					"foo":            pulumi.String("bar"),
    98  //					"email":          pulumi.String("no-reply@example.com"),
    99  //					"email_verified": pulumi.String("true"),
   100  //				},
   101  //			})
   102  //			if err != nil {
   103  //				return err
   104  //			}
   105  //			return nil
   106  //		})
   107  //	}
   108  //
   109  // ```
   110  // <!--End PulumiCodeChooser -->
   111  //
   112  // ## Import
   113  //
   114  // Using `pulumi import`, import Cognito User using the `user_pool_id`/`name` attributes concatenated. For example:
   115  //
   116  // ```sh
   117  // $ pulumi import aws:cognito/user:User user us-east-1_vG78M4goG/user
   118  // ```
   119  type User struct {
   120  	pulumi.CustomResourceState
   121  
   122  	// A map that contains user attributes and attribute values to be set for the user.
   123  	Attributes pulumi.StringMapOutput `pulumi:"attributes"`
   124  	// A map of custom key-value pairs that you can provide as input for any custom workflows that user creation triggers. Amazon Cognito does not store the `clientMetadata` value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   125  	ClientMetadata pulumi.StringMapOutput `pulumi:"clientMetadata"`
   126  	CreationDate   pulumi.StringOutput    `pulumi:"creationDate"`
   127  	// A list of mediums to the welcome message will be sent through. Allowed values are `EMAIL` and `SMS`. If it's provided, make sure you have also specified `email` attribute for the `EMAIL` medium and `phoneNumber` for the `SMS`. More than one value can be specified. Amazon Cognito does not store the `desiredDeliveryMediums` value. Defaults to `["SMS"]`.
   128  	DesiredDeliveryMediums pulumi.StringArrayOutput `pulumi:"desiredDeliveryMediums"`
   129  	// Specifies whether the user should be enabled after creation. The welcome message will be sent regardless of the `enabled` value. The behavior can be changed with `messageAction` argument. Defaults to `true`.
   130  	Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
   131  	// If this parameter is set to True and the `phoneNumber` or `email` address specified in the `attributes` parameter already exists as an alias with a different user, Amazon Cognito will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias. Amazon Cognito does not store the `forceAliasCreation` value. Defaults to `false`.
   132  	ForceAliasCreation pulumi.BoolPtrOutput `pulumi:"forceAliasCreation"`
   133  	LastModifiedDate   pulumi.StringOutput  `pulumi:"lastModifiedDate"`
   134  	// Set to `RESEND` to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to `SUPPRESS` to suppress sending the message. Only one value can be specified. Amazon Cognito does not store the `messageAction` value.
   135  	MessageAction   pulumi.StringPtrOutput   `pulumi:"messageAction"`
   136  	MfaSettingLists pulumi.StringArrayOutput `pulumi:"mfaSettingLists"`
   137  	// The user's permanent password. This password must conform to the password policy specified by user pool the user belongs to. The welcome message always contains only `temporaryPassword` value. You can suppress sending the welcome message with the `messageAction` argument. Amazon Cognito does not store the `password` value. Conflicts with `temporaryPassword`.
   138  	Password            pulumi.StringPtrOutput `pulumi:"password"`
   139  	PreferredMfaSetting pulumi.StringOutput    `pulumi:"preferredMfaSetting"`
   140  	// current user status.
   141  	Status pulumi.StringOutput `pulumi:"status"`
   142  	// unique user id that is never reassignable to another user.
   143  	Sub pulumi.StringOutput `pulumi:"sub"`
   144  	// The user's temporary password. Conflicts with `password`.
   145  	TemporaryPassword pulumi.StringPtrOutput `pulumi:"temporaryPassword"`
   146  	// The user pool ID for the user pool where the user will be created.
   147  	UserPoolId pulumi.StringOutput `pulumi:"userPoolId"`
   148  	// The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.
   149  	//
   150  	// The following arguments are optional:
   151  	Username pulumi.StringOutput `pulumi:"username"`
   152  	// The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. Amazon Cognito does not store the `validationData` value. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   153  	//
   154  	// > **NOTE:** Clearing `password` or `temporaryPassword` does not reset user's password in Cognito.
   155  	ValidationData pulumi.StringMapOutput `pulumi:"validationData"`
   156  }
   157  
   158  // NewUser registers a new resource with the given unique name, arguments, and options.
   159  func NewUser(ctx *pulumi.Context,
   160  	name string, args *UserArgs, opts ...pulumi.ResourceOption) (*User, error) {
   161  	if args == nil {
   162  		return nil, errors.New("missing one or more required arguments")
   163  	}
   164  
   165  	if args.UserPoolId == nil {
   166  		return nil, errors.New("invalid value for required argument 'UserPoolId'")
   167  	}
   168  	if args.Username == nil {
   169  		return nil, errors.New("invalid value for required argument 'Username'")
   170  	}
   171  	if args.Password != nil {
   172  		args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput)
   173  	}
   174  	if args.TemporaryPassword != nil {
   175  		args.TemporaryPassword = pulumi.ToSecret(args.TemporaryPassword).(pulumi.StringPtrInput)
   176  	}
   177  	secrets := pulumi.AdditionalSecretOutputs([]string{
   178  		"password",
   179  		"temporaryPassword",
   180  	})
   181  	opts = append(opts, secrets)
   182  	opts = internal.PkgResourceDefaultOpts(opts)
   183  	var resource User
   184  	err := ctx.RegisterResource("aws:cognito/user:User", name, args, &resource, opts...)
   185  	if err != nil {
   186  		return nil, err
   187  	}
   188  	return &resource, nil
   189  }
   190  
   191  // GetUser gets an existing User resource's state with the given name, ID, and optional
   192  // state properties that are used to uniquely qualify the lookup (nil if not required).
   193  func GetUser(ctx *pulumi.Context,
   194  	name string, id pulumi.IDInput, state *UserState, opts ...pulumi.ResourceOption) (*User, error) {
   195  	var resource User
   196  	err := ctx.ReadResource("aws:cognito/user:User", name, id, state, &resource, opts...)
   197  	if err != nil {
   198  		return nil, err
   199  	}
   200  	return &resource, nil
   201  }
   202  
   203  // Input properties used for looking up and filtering User resources.
   204  type userState struct {
   205  	// A map that contains user attributes and attribute values to be set for the user.
   206  	Attributes map[string]string `pulumi:"attributes"`
   207  	// A map of custom key-value pairs that you can provide as input for any custom workflows that user creation triggers. Amazon Cognito does not store the `clientMetadata` value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   208  	ClientMetadata map[string]string `pulumi:"clientMetadata"`
   209  	CreationDate   *string           `pulumi:"creationDate"`
   210  	// A list of mediums to the welcome message will be sent through. Allowed values are `EMAIL` and `SMS`. If it's provided, make sure you have also specified `email` attribute for the `EMAIL` medium and `phoneNumber` for the `SMS`. More than one value can be specified. Amazon Cognito does not store the `desiredDeliveryMediums` value. Defaults to `["SMS"]`.
   211  	DesiredDeliveryMediums []string `pulumi:"desiredDeliveryMediums"`
   212  	// Specifies whether the user should be enabled after creation. The welcome message will be sent regardless of the `enabled` value. The behavior can be changed with `messageAction` argument. Defaults to `true`.
   213  	Enabled *bool `pulumi:"enabled"`
   214  	// If this parameter is set to True and the `phoneNumber` or `email` address specified in the `attributes` parameter already exists as an alias with a different user, Amazon Cognito will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias. Amazon Cognito does not store the `forceAliasCreation` value. Defaults to `false`.
   215  	ForceAliasCreation *bool   `pulumi:"forceAliasCreation"`
   216  	LastModifiedDate   *string `pulumi:"lastModifiedDate"`
   217  	// Set to `RESEND` to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to `SUPPRESS` to suppress sending the message. Only one value can be specified. Amazon Cognito does not store the `messageAction` value.
   218  	MessageAction   *string  `pulumi:"messageAction"`
   219  	MfaSettingLists []string `pulumi:"mfaSettingLists"`
   220  	// The user's permanent password. This password must conform to the password policy specified by user pool the user belongs to. The welcome message always contains only `temporaryPassword` value. You can suppress sending the welcome message with the `messageAction` argument. Amazon Cognito does not store the `password` value. Conflicts with `temporaryPassword`.
   221  	Password            *string `pulumi:"password"`
   222  	PreferredMfaSetting *string `pulumi:"preferredMfaSetting"`
   223  	// current user status.
   224  	Status *string `pulumi:"status"`
   225  	// unique user id that is never reassignable to another user.
   226  	Sub *string `pulumi:"sub"`
   227  	// The user's temporary password. Conflicts with `password`.
   228  	TemporaryPassword *string `pulumi:"temporaryPassword"`
   229  	// The user pool ID for the user pool where the user will be created.
   230  	UserPoolId *string `pulumi:"userPoolId"`
   231  	// The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.
   232  	//
   233  	// The following arguments are optional:
   234  	Username *string `pulumi:"username"`
   235  	// The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. Amazon Cognito does not store the `validationData` value. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   236  	//
   237  	// > **NOTE:** Clearing `password` or `temporaryPassword` does not reset user's password in Cognito.
   238  	ValidationData map[string]string `pulumi:"validationData"`
   239  }
   240  
   241  type UserState struct {
   242  	// A map that contains user attributes and attribute values to be set for the user.
   243  	Attributes pulumi.StringMapInput
   244  	// A map of custom key-value pairs that you can provide as input for any custom workflows that user creation triggers. Amazon Cognito does not store the `clientMetadata` value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   245  	ClientMetadata pulumi.StringMapInput
   246  	CreationDate   pulumi.StringPtrInput
   247  	// A list of mediums to the welcome message will be sent through. Allowed values are `EMAIL` and `SMS`. If it's provided, make sure you have also specified `email` attribute for the `EMAIL` medium and `phoneNumber` for the `SMS`. More than one value can be specified. Amazon Cognito does not store the `desiredDeliveryMediums` value. Defaults to `["SMS"]`.
   248  	DesiredDeliveryMediums pulumi.StringArrayInput
   249  	// Specifies whether the user should be enabled after creation. The welcome message will be sent regardless of the `enabled` value. The behavior can be changed with `messageAction` argument. Defaults to `true`.
   250  	Enabled pulumi.BoolPtrInput
   251  	// If this parameter is set to True and the `phoneNumber` or `email` address specified in the `attributes` parameter already exists as an alias with a different user, Amazon Cognito will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias. Amazon Cognito does not store the `forceAliasCreation` value. Defaults to `false`.
   252  	ForceAliasCreation pulumi.BoolPtrInput
   253  	LastModifiedDate   pulumi.StringPtrInput
   254  	// Set to `RESEND` to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to `SUPPRESS` to suppress sending the message. Only one value can be specified. Amazon Cognito does not store the `messageAction` value.
   255  	MessageAction   pulumi.StringPtrInput
   256  	MfaSettingLists pulumi.StringArrayInput
   257  	// The user's permanent password. This password must conform to the password policy specified by user pool the user belongs to. The welcome message always contains only `temporaryPassword` value. You can suppress sending the welcome message with the `messageAction` argument. Amazon Cognito does not store the `password` value. Conflicts with `temporaryPassword`.
   258  	Password            pulumi.StringPtrInput
   259  	PreferredMfaSetting pulumi.StringPtrInput
   260  	// current user status.
   261  	Status pulumi.StringPtrInput
   262  	// unique user id that is never reassignable to another user.
   263  	Sub pulumi.StringPtrInput
   264  	// The user's temporary password. Conflicts with `password`.
   265  	TemporaryPassword pulumi.StringPtrInput
   266  	// The user pool ID for the user pool where the user will be created.
   267  	UserPoolId pulumi.StringPtrInput
   268  	// The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.
   269  	//
   270  	// The following arguments are optional:
   271  	Username pulumi.StringPtrInput
   272  	// The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. Amazon Cognito does not store the `validationData` value. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   273  	//
   274  	// > **NOTE:** Clearing `password` or `temporaryPassword` does not reset user's password in Cognito.
   275  	ValidationData pulumi.StringMapInput
   276  }
   277  
   278  func (UserState) ElementType() reflect.Type {
   279  	return reflect.TypeOf((*userState)(nil)).Elem()
   280  }
   281  
   282  type userArgs struct {
   283  	// A map that contains user attributes and attribute values to be set for the user.
   284  	Attributes map[string]string `pulumi:"attributes"`
   285  	// A map of custom key-value pairs that you can provide as input for any custom workflows that user creation triggers. Amazon Cognito does not store the `clientMetadata` value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   286  	ClientMetadata map[string]string `pulumi:"clientMetadata"`
   287  	// A list of mediums to the welcome message will be sent through. Allowed values are `EMAIL` and `SMS`. If it's provided, make sure you have also specified `email` attribute for the `EMAIL` medium and `phoneNumber` for the `SMS`. More than one value can be specified. Amazon Cognito does not store the `desiredDeliveryMediums` value. Defaults to `["SMS"]`.
   288  	DesiredDeliveryMediums []string `pulumi:"desiredDeliveryMediums"`
   289  	// Specifies whether the user should be enabled after creation. The welcome message will be sent regardless of the `enabled` value. The behavior can be changed with `messageAction` argument. Defaults to `true`.
   290  	Enabled *bool `pulumi:"enabled"`
   291  	// If this parameter is set to True and the `phoneNumber` or `email` address specified in the `attributes` parameter already exists as an alias with a different user, Amazon Cognito will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias. Amazon Cognito does not store the `forceAliasCreation` value. Defaults to `false`.
   292  	ForceAliasCreation *bool `pulumi:"forceAliasCreation"`
   293  	// Set to `RESEND` to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to `SUPPRESS` to suppress sending the message. Only one value can be specified. Amazon Cognito does not store the `messageAction` value.
   294  	MessageAction *string `pulumi:"messageAction"`
   295  	// The user's permanent password. This password must conform to the password policy specified by user pool the user belongs to. The welcome message always contains only `temporaryPassword` value. You can suppress sending the welcome message with the `messageAction` argument. Amazon Cognito does not store the `password` value. Conflicts with `temporaryPassword`.
   296  	Password *string `pulumi:"password"`
   297  	// The user's temporary password. Conflicts with `password`.
   298  	TemporaryPassword *string `pulumi:"temporaryPassword"`
   299  	// The user pool ID for the user pool where the user will be created.
   300  	UserPoolId string `pulumi:"userPoolId"`
   301  	// The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.
   302  	//
   303  	// The following arguments are optional:
   304  	Username string `pulumi:"username"`
   305  	// The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. Amazon Cognito does not store the `validationData` value. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   306  	//
   307  	// > **NOTE:** Clearing `password` or `temporaryPassword` does not reset user's password in Cognito.
   308  	ValidationData map[string]string `pulumi:"validationData"`
   309  }
   310  
   311  // The set of arguments for constructing a User resource.
   312  type UserArgs struct {
   313  	// A map that contains user attributes and attribute values to be set for the user.
   314  	Attributes pulumi.StringMapInput
   315  	// A map of custom key-value pairs that you can provide as input for any custom workflows that user creation triggers. Amazon Cognito does not store the `clientMetadata` value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   316  	ClientMetadata pulumi.StringMapInput
   317  	// A list of mediums to the welcome message will be sent through. Allowed values are `EMAIL` and `SMS`. If it's provided, make sure you have also specified `email` attribute for the `EMAIL` medium and `phoneNumber` for the `SMS`. More than one value can be specified. Amazon Cognito does not store the `desiredDeliveryMediums` value. Defaults to `["SMS"]`.
   318  	DesiredDeliveryMediums pulumi.StringArrayInput
   319  	// Specifies whether the user should be enabled after creation. The welcome message will be sent regardless of the `enabled` value. The behavior can be changed with `messageAction` argument. Defaults to `true`.
   320  	Enabled pulumi.BoolPtrInput
   321  	// If this parameter is set to True and the `phoneNumber` or `email` address specified in the `attributes` parameter already exists as an alias with a different user, Amazon Cognito will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias. Amazon Cognito does not store the `forceAliasCreation` value. Defaults to `false`.
   322  	ForceAliasCreation pulumi.BoolPtrInput
   323  	// Set to `RESEND` to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to `SUPPRESS` to suppress sending the message. Only one value can be specified. Amazon Cognito does not store the `messageAction` value.
   324  	MessageAction pulumi.StringPtrInput
   325  	// The user's permanent password. This password must conform to the password policy specified by user pool the user belongs to. The welcome message always contains only `temporaryPassword` value. You can suppress sending the welcome message with the `messageAction` argument. Amazon Cognito does not store the `password` value. Conflicts with `temporaryPassword`.
   326  	Password pulumi.StringPtrInput
   327  	// The user's temporary password. Conflicts with `password`.
   328  	TemporaryPassword pulumi.StringPtrInput
   329  	// The user pool ID for the user pool where the user will be created.
   330  	UserPoolId pulumi.StringInput
   331  	// The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.
   332  	//
   333  	// The following arguments are optional:
   334  	Username pulumi.StringInput
   335  	// The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. Amazon Cognito does not store the `validationData` value. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   336  	//
   337  	// > **NOTE:** Clearing `password` or `temporaryPassword` does not reset user's password in Cognito.
   338  	ValidationData pulumi.StringMapInput
   339  }
   340  
   341  func (UserArgs) ElementType() reflect.Type {
   342  	return reflect.TypeOf((*userArgs)(nil)).Elem()
   343  }
   344  
   345  type UserInput interface {
   346  	pulumi.Input
   347  
   348  	ToUserOutput() UserOutput
   349  	ToUserOutputWithContext(ctx context.Context) UserOutput
   350  }
   351  
   352  func (*User) ElementType() reflect.Type {
   353  	return reflect.TypeOf((**User)(nil)).Elem()
   354  }
   355  
   356  func (i *User) ToUserOutput() UserOutput {
   357  	return i.ToUserOutputWithContext(context.Background())
   358  }
   359  
   360  func (i *User) ToUserOutputWithContext(ctx context.Context) UserOutput {
   361  	return pulumi.ToOutputWithContext(ctx, i).(UserOutput)
   362  }
   363  
   364  // UserArrayInput is an input type that accepts UserArray and UserArrayOutput values.
   365  // You can construct a concrete instance of `UserArrayInput` via:
   366  //
   367  //	UserArray{ UserArgs{...} }
   368  type UserArrayInput interface {
   369  	pulumi.Input
   370  
   371  	ToUserArrayOutput() UserArrayOutput
   372  	ToUserArrayOutputWithContext(context.Context) UserArrayOutput
   373  }
   374  
   375  type UserArray []UserInput
   376  
   377  func (UserArray) ElementType() reflect.Type {
   378  	return reflect.TypeOf((*[]*User)(nil)).Elem()
   379  }
   380  
   381  func (i UserArray) ToUserArrayOutput() UserArrayOutput {
   382  	return i.ToUserArrayOutputWithContext(context.Background())
   383  }
   384  
   385  func (i UserArray) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput {
   386  	return pulumi.ToOutputWithContext(ctx, i).(UserArrayOutput)
   387  }
   388  
   389  // UserMapInput is an input type that accepts UserMap and UserMapOutput values.
   390  // You can construct a concrete instance of `UserMapInput` via:
   391  //
   392  //	UserMap{ "key": UserArgs{...} }
   393  type UserMapInput interface {
   394  	pulumi.Input
   395  
   396  	ToUserMapOutput() UserMapOutput
   397  	ToUserMapOutputWithContext(context.Context) UserMapOutput
   398  }
   399  
   400  type UserMap map[string]UserInput
   401  
   402  func (UserMap) ElementType() reflect.Type {
   403  	return reflect.TypeOf((*map[string]*User)(nil)).Elem()
   404  }
   405  
   406  func (i UserMap) ToUserMapOutput() UserMapOutput {
   407  	return i.ToUserMapOutputWithContext(context.Background())
   408  }
   409  
   410  func (i UserMap) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput {
   411  	return pulumi.ToOutputWithContext(ctx, i).(UserMapOutput)
   412  }
   413  
   414  type UserOutput struct{ *pulumi.OutputState }
   415  
   416  func (UserOutput) ElementType() reflect.Type {
   417  	return reflect.TypeOf((**User)(nil)).Elem()
   418  }
   419  
   420  func (o UserOutput) ToUserOutput() UserOutput {
   421  	return o
   422  }
   423  
   424  func (o UserOutput) ToUserOutputWithContext(ctx context.Context) UserOutput {
   425  	return o
   426  }
   427  
   428  // A map that contains user attributes and attribute values to be set for the user.
   429  func (o UserOutput) Attributes() pulumi.StringMapOutput {
   430  	return o.ApplyT(func(v *User) pulumi.StringMapOutput { return v.Attributes }).(pulumi.StringMapOutput)
   431  }
   432  
   433  // A map of custom key-value pairs that you can provide as input for any custom workflows that user creation triggers. Amazon Cognito does not store the `clientMetadata` value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   434  func (o UserOutput) ClientMetadata() pulumi.StringMapOutput {
   435  	return o.ApplyT(func(v *User) pulumi.StringMapOutput { return v.ClientMetadata }).(pulumi.StringMapOutput)
   436  }
   437  
   438  func (o UserOutput) CreationDate() pulumi.StringOutput {
   439  	return o.ApplyT(func(v *User) pulumi.StringOutput { return v.CreationDate }).(pulumi.StringOutput)
   440  }
   441  
   442  // A list of mediums to the welcome message will be sent through. Allowed values are `EMAIL` and `SMS`. If it's provided, make sure you have also specified `email` attribute for the `EMAIL` medium and `phoneNumber` for the `SMS`. More than one value can be specified. Amazon Cognito does not store the `desiredDeliveryMediums` value. Defaults to `["SMS"]`.
   443  func (o UserOutput) DesiredDeliveryMediums() pulumi.StringArrayOutput {
   444  	return o.ApplyT(func(v *User) pulumi.StringArrayOutput { return v.DesiredDeliveryMediums }).(pulumi.StringArrayOutput)
   445  }
   446  
   447  // Specifies whether the user should be enabled after creation. The welcome message will be sent regardless of the `enabled` value. The behavior can be changed with `messageAction` argument. Defaults to `true`.
   448  func (o UserOutput) Enabled() pulumi.BoolPtrOutput {
   449  	return o.ApplyT(func(v *User) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
   450  }
   451  
   452  // If this parameter is set to True and the `phoneNumber` or `email` address specified in the `attributes` parameter already exists as an alias with a different user, Amazon Cognito will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias. Amazon Cognito does not store the `forceAliasCreation` value. Defaults to `false`.
   453  func (o UserOutput) ForceAliasCreation() pulumi.BoolPtrOutput {
   454  	return o.ApplyT(func(v *User) pulumi.BoolPtrOutput { return v.ForceAliasCreation }).(pulumi.BoolPtrOutput)
   455  }
   456  
   457  func (o UserOutput) LastModifiedDate() pulumi.StringOutput {
   458  	return o.ApplyT(func(v *User) pulumi.StringOutput { return v.LastModifiedDate }).(pulumi.StringOutput)
   459  }
   460  
   461  // Set to `RESEND` to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to `SUPPRESS` to suppress sending the message. Only one value can be specified. Amazon Cognito does not store the `messageAction` value.
   462  func (o UserOutput) MessageAction() pulumi.StringPtrOutput {
   463  	return o.ApplyT(func(v *User) pulumi.StringPtrOutput { return v.MessageAction }).(pulumi.StringPtrOutput)
   464  }
   465  
   466  func (o UserOutput) MfaSettingLists() pulumi.StringArrayOutput {
   467  	return o.ApplyT(func(v *User) pulumi.StringArrayOutput { return v.MfaSettingLists }).(pulumi.StringArrayOutput)
   468  }
   469  
   470  // The user's permanent password. This password must conform to the password policy specified by user pool the user belongs to. The welcome message always contains only `temporaryPassword` value. You can suppress sending the welcome message with the `messageAction` argument. Amazon Cognito does not store the `password` value. Conflicts with `temporaryPassword`.
   471  func (o UserOutput) Password() pulumi.StringPtrOutput {
   472  	return o.ApplyT(func(v *User) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput)
   473  }
   474  
   475  func (o UserOutput) PreferredMfaSetting() pulumi.StringOutput {
   476  	return o.ApplyT(func(v *User) pulumi.StringOutput { return v.PreferredMfaSetting }).(pulumi.StringOutput)
   477  }
   478  
   479  // current user status.
   480  func (o UserOutput) Status() pulumi.StringOutput {
   481  	return o.ApplyT(func(v *User) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   482  }
   483  
   484  // unique user id that is never reassignable to another user.
   485  func (o UserOutput) Sub() pulumi.StringOutput {
   486  	return o.ApplyT(func(v *User) pulumi.StringOutput { return v.Sub }).(pulumi.StringOutput)
   487  }
   488  
   489  // The user's temporary password. Conflicts with `password`.
   490  func (o UserOutput) TemporaryPassword() pulumi.StringPtrOutput {
   491  	return o.ApplyT(func(v *User) pulumi.StringPtrOutput { return v.TemporaryPassword }).(pulumi.StringPtrOutput)
   492  }
   493  
   494  // The user pool ID for the user pool where the user will be created.
   495  func (o UserOutput) UserPoolId() pulumi.StringOutput {
   496  	return o.ApplyT(func(v *User) pulumi.StringOutput { return v.UserPoolId }).(pulumi.StringOutput)
   497  }
   498  
   499  // The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.
   500  //
   501  // The following arguments are optional:
   502  func (o UserOutput) Username() pulumi.StringOutput {
   503  	return o.ApplyT(func(v *User) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput)
   504  }
   505  
   506  // The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. Amazon Cognito does not store the `validationData` value. For more information, see [Customizing User Pool Workflows with Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html).
   507  //
   508  // > **NOTE:** Clearing `password` or `temporaryPassword` does not reset user's password in Cognito.
   509  func (o UserOutput) ValidationData() pulumi.StringMapOutput {
   510  	return o.ApplyT(func(v *User) pulumi.StringMapOutput { return v.ValidationData }).(pulumi.StringMapOutput)
   511  }
   512  
   513  type UserArrayOutput struct{ *pulumi.OutputState }
   514  
   515  func (UserArrayOutput) ElementType() reflect.Type {
   516  	return reflect.TypeOf((*[]*User)(nil)).Elem()
   517  }
   518  
   519  func (o UserArrayOutput) ToUserArrayOutput() UserArrayOutput {
   520  	return o
   521  }
   522  
   523  func (o UserArrayOutput) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput {
   524  	return o
   525  }
   526  
   527  func (o UserArrayOutput) Index(i pulumi.IntInput) UserOutput {
   528  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *User {
   529  		return vs[0].([]*User)[vs[1].(int)]
   530  	}).(UserOutput)
   531  }
   532  
   533  type UserMapOutput struct{ *pulumi.OutputState }
   534  
   535  func (UserMapOutput) ElementType() reflect.Type {
   536  	return reflect.TypeOf((*map[string]*User)(nil)).Elem()
   537  }
   538  
   539  func (o UserMapOutput) ToUserMapOutput() UserMapOutput {
   540  	return o
   541  }
   542  
   543  func (o UserMapOutput) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput {
   544  	return o
   545  }
   546  
   547  func (o UserMapOutput) MapIndex(k pulumi.StringInput) UserOutput {
   548  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *User {
   549  		return vs[0].(map[string]*User)[vs[1].(string)]
   550  	}).(UserOutput)
   551  }
   552  
   553  func init() {
   554  	pulumi.RegisterInputType(reflect.TypeOf((*UserInput)(nil)).Elem(), &User{})
   555  	pulumi.RegisterInputType(reflect.TypeOf((*UserArrayInput)(nil)).Elem(), UserArray{})
   556  	pulumi.RegisterInputType(reflect.TypeOf((*UserMapInput)(nil)).Elem(), UserMap{})
   557  	pulumi.RegisterOutputType(UserOutput{})
   558  	pulumi.RegisterOutputType(UserArrayOutput{})
   559  	pulumi.RegisterOutputType(UserMapOutput{})
   560  }