Skip to content

Commit f836cd9

Browse files
authored
feat: Added UserAttributeUpdateSettings to Cognito (#2503)
1 parent cda614b commit f836cd9

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

samtranslator/model/cognito.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class CognitoUserPool(Resource):
2222
"SmsAuthenticationMessage": PropertyType(False, is_str()),
2323
"SmsConfiguration": PropertyType(False, is_type(dict)),
2424
"SmsVerificationMessage": PropertyType(False, is_str()),
25+
"UserAttributeUpdateSettings": PropertyType(False, is_type(dict)),
2526
"UsernameAttributes": PropertyType(False, list_of(is_str())),
2627
"UsernameConfiguration": PropertyType(False, is_type(dict)),
2728
"UserPoolAddOns": PropertyType(False, list_of(dict)),

tests/translator/input/cognito_userpool_with_event.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Resources:
1212
- AttributeDataType: String
1313
Name: email
1414
Required: false
15+
UserAttributeUpdateSettings:
16+
AttributesRequireVerificationBeforeUpdate:
17+
- email
1518
ImplicitApiFunction:
1619
Type: AWS::Serverless::Function
1720
Properties:

tests/translator/output/aws-cn/cognito_userpool_with_event.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"Required": false
3636
}
3737
],
38+
"UserAttributeUpdateSettings": {
39+
"AttributesRequireVerificationBeforeUpdate": [
40+
"email"
41+
]
42+
},
3843
"UsernameAttributes": [
3944
"email"
4045
],

tests/translator/output/aws-us-gov/cognito_userpool_with_event.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"Required": false
3636
}
3737
],
38+
"UserAttributeUpdateSettings": {
39+
"AttributesRequireVerificationBeforeUpdate": [
40+
"email"
41+
]
42+
},
3843
"UsernameAttributes": [
3944
"email"
4045
],

tests/translator/output/cognito_userpool_with_event.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"Required": false
3636
}
3737
],
38+
"UserAttributeUpdateSettings": {
39+
"AttributesRequireVerificationBeforeUpdate": [
40+
"email"
41+
]
42+
},
3843
"UsernameAttributes": [
3944
"email"
4045
],

0 commit comments

Comments
 (0)