File Coverage

blib/lib/Paws/CognitoIdp/AdminCreateUser.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::CognitoIdp::AdminCreateUser;
3 1     1   325 use Moose;
  1         2  
  1         6  
4             has DesiredDeliveryMediums => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
5             has ForceAliasCreation => (is => 'ro', isa => 'Bool');
6             has MessageAction => (is => 'ro', isa => 'Str');
7             has TemporaryPassword => (is => 'ro', isa => 'Str');
8             has UserAttributes => (is => 'ro', isa => 'ArrayRef[Paws::CognitoIdp::AttributeType]');
9             has Username => (is => 'ro', isa => 'Str', required => 1);
10             has UserPoolId => (is => 'ro', isa => 'Str', required => 1);
11             has ValidationData => (is => 'ro', isa => 'ArrayRef[Paws::CognitoIdp::AttributeType]');
12              
13 1     1   5441 use MooseX::ClassAttribute;
  1         2  
  1         7  
14              
15             class_has _api_call => (isa => 'Str', is => 'ro', default => 'AdminCreateUser');
16             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CognitoIdp::AdminCreateUserResponse');
17             class_has _result_key => (isa => 'Str', is => 'ro');
18             1;
19              
20             ### main pod documentation begin ###
21              
22             =head1 NAME
23              
24             Paws::CognitoIdp::AdminCreateUser - Arguments for method AdminCreateUser on Paws::CognitoIdp
25              
26             =head1 DESCRIPTION
27              
28             This class represents the parameters used for calling the method AdminCreateUser on the
29             Amazon Cognito Identity Provider service. Use the attributes of this class
30             as arguments to method AdminCreateUser.
31              
32             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to AdminCreateUser.
33              
34             As an example:
35              
36             $service_obj->AdminCreateUser(Att1 => $value1, Att2 => $value2, ...);
37              
38             Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
39              
40             =head1 ATTRIBUTES
41              
42              
43             =head2 DesiredDeliveryMediums => ArrayRef[Str|Undef]
44              
45             Specify C<"EMAIL"> if email will be used to send the welcome message.
46             Specify C<"SMS"> if the phone number will be used. The default value is
47             C<"SMS">. More than one value can be specified.
48              
49              
50              
51             =head2 ForceAliasCreation => Bool
52              
53             This parameter is only used if the C<phone_number_verified> or
54             C<email_verified> attribute is set to C<True>. Otherwise, it is
55             ignored.
56              
57             If this parameter is set to C<True> and the phone number or email
58             address specified in the UserAttributes parameter already exists as an
59             alias with a different user, the API call will migrate the alias from
60             the previous user to the newly created user. The previous user will no
61             longer be able to log in using that alias.
62              
63             If this parameter is set to C<False>, the API throws an
64             C<AliasExistsException> error if the alias already exists. The default
65             value is C<False>.
66              
67              
68              
69             =head2 MessageAction => Str
70              
71             Set to C<"RESEND"> to resend the invitation message to a user that
72             already exists and reset the expiration limit on the user's account.
73             Set to C<"SUPPRESS"> to suppress sending the message. Only one value
74             can be specified.
75              
76             Valid values are: C<"RESEND">, C<"SUPPRESS">
77              
78             =head2 TemporaryPassword => Str
79              
80             The user's temporary password. This password must conform to the
81             password policy that you specified when you created the user pool.
82              
83             The temporary password is valid only once. To complete the Admin Create
84             User flow, the user must enter the temporary password in the sign-in
85             page along with a new password to be used in all future sign-ins.
86              
87             This parameter is not required. If you do not specify a value, Amazon
88             Cognito generates one for you.
89              
90             The temporary password can only be used until the user account
91             expiration limit that you specified when you created the user pool. To
92             reset the account after that time limit, you must call
93             C<AdminCreateUser> again, specifying C<"RESEND"> for the
94             C<MessageAction> parameter.
95              
96              
97              
98             =head2 UserAttributes => ArrayRef[L<Paws::CognitoIdp::AttributeType>]
99              
100             An array of name-value pairs that contain user attributes and attribute
101             values to be set for the user to be created. You can create a user
102             without specifying any attributes other than C<Username>. However, any
103             attributes that you specify as required (in CreateUserPool or in the
104             B<Attributes> tab of the console) must be supplied either by you (in
105             your call to C<AdminCreateUser>) or by the user (when he or she signs
106             up in response to your welcome message).
107              
108             For custom attributes, you must prepend the C<custom:> prefix to the
109             attribute name.
110              
111             To send a message inviting the user to sign up, you must specify the
112             user's email address or phone number. This can be done in your call to
113             AdminCreateUser or in the B<Users> tab of the Amazon Cognito console
114             for managing your user pools.
115              
116             In your call to C<AdminCreateUser>, you can set the C<email_verified>
117             attribute to C<True>, and you can set the C<phone_number_verified>
118             attribute to C<True>. (You can also do this by calling
119             AdminUpdateUserAttributes.)
120              
121             =over
122              
123             =item *
124              
125             B<email>: The email address of the user to whom the message that
126             contains the code and username will be sent. Required if the
127             C<email_verified> attribute is set to C<True>, or if C<"EMAIL"> is
128             specified in the C<DesiredDeliveryMediums> parameter.
129              
130             =item *
131              
132             B<phone_number>: The phone number of the user to whom the message that
133             contains the code and username will be sent. Required if the
134             C<phone_number_verified> attribute is set to C<True>, or if C<"SMS"> is
135             specified in the C<DesiredDeliveryMediums> parameter.
136              
137             =back
138              
139              
140              
141              
142             =head2 B<REQUIRED> Username => Str
143              
144             The username for the user. Must be unique within the user pool. Must be
145             a UTF-8 string between 1 and 128 characters. After the user is created,
146             the username cannot be changed.
147              
148              
149              
150             =head2 B<REQUIRED> UserPoolId => Str
151              
152             The user pool ID for the user pool where the user will be created.
153              
154              
155              
156             =head2 ValidationData => ArrayRef[L<Paws::CognitoIdp::AttributeType>]
157              
158             The user's validation data. This is an array of name-value pairs that
159             contain user attributes and attribute values that you can use for
160             custom validation, such as restricting the types of user accounts that
161             can be registered. For example, you might choose to allow or disallow
162             user sign-up based on the user's domain.
163              
164             To configure custom validation, you must create a Pre Sign-up Lambda
165             trigger for the user pool as described in the Amazon Cognito Developer
166             Guide. The Lambda trigger receives the validation data and uses it in
167             the validation process.
168              
169             The user's validation data is not persisted.
170              
171              
172              
173              
174             =head1 SEE ALSO
175              
176             This class forms part of L<Paws>, documenting arguments for method AdminCreateUser in L<Paws::CognitoIdp>
177              
178             =head1 BUGS and CONTRIBUTIONS
179              
180             The source code is located here: https://github.com/pplu/aws-sdk-perl
181              
182             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
183              
184             =cut
185