@@ -576,22 +576,31 @@ def admin_get_user(self, attr_map=None):
576
576
)
577
577
578
578
def admin_create_user (
579
- self , username , temporary_password = "" , attr_map = None , ** kwargs
579
+ self ,
580
+ username ,
581
+ temporary_password = "" ,
582
+ additional_kwargs = None ,
583
+ attr_map = None ,
584
+ ** kwargs ,
580
585
):
581
586
"""
582
587
Create a user using admin super privileges.
583
588
:param username: User Pool username
584
589
:param temporary_password: The temporary password to give the user.
585
590
Leave blank to make Cognito generate a temporary password for the user.
591
+ :param additional_kwargs: Dictionary with request params, such as MessageAction.
586
592
:param attr_map: Attribute map to Cognito's attributes
587
593
:param kwargs: Additional User Pool attributes
588
594
:return response: Response from Cognito
589
595
"""
596
+ if additional_kwargs is None :
597
+ additional_kwargs = {}
590
598
response = self .client .admin_create_user (
591
599
UserPoolId = self .user_pool_id ,
592
600
Username = username ,
593
601
UserAttributes = dict_to_cognito (kwargs , attr_map ),
594
602
TemporaryPassword = temporary_password ,
603
+ ** additional_kwargs ,
595
604
)
596
605
kwargs .update (username = username )
597
606
self ._set_attributes (response , kwargs )
@@ -656,7 +665,7 @@ def admin_reset_password(self, username, client_metadata=None):
656
665
self .client .admin_reset_user_password (
657
666
UserPoolId = self .user_pool_id ,
658
667
Username = username ,
659
- ClientMetatada = client_metadata ,
668
+ ClientMetadata = client_metadata ,
660
669
)
661
670
662
671
def confirm_forgot_password (self , confirmation_code , password ):
0 commit comments