diff --git a/samtranslator/model/cognito.py b/samtranslator/model/cognito.py index 9dc6772751..bb655b8577 100644 --- a/samtranslator/model/cognito.py +++ b/samtranslator/model/cognito.py @@ -11,6 +11,8 @@ class CognitoUserPool(Resource): "AutoVerifiedAttributes": GeneratedProperty(), "DeletionProtection": GeneratedProperty(), "DeviceConfiguration": GeneratedProperty(), + "EmailAuthenticationMessage": GeneratedProperty(), + "EmailAuthenticationSubject": GeneratedProperty(), "EmailConfiguration": GeneratedProperty(), "EmailVerificationMessage": GeneratedProperty(), "EmailVerificationSubject": GeneratedProperty(), @@ -28,7 +30,10 @@ class CognitoUserPool(Resource): "UserPoolAddOns": GeneratedProperty(), "UserPoolName": GeneratedProperty(), "UserPoolTags": GeneratedProperty(), + "UserPoolTier": GeneratedProperty(), "VerificationMessageTemplate": GeneratedProperty(), + "WebAuthnRelyingPartyID": GeneratedProperty(), + "WebAuthnUserVerification": GeneratedProperty(), } runtime_attrs = { diff --git a/tests/translator/input/cognito_template_with_new_properties.yaml b/tests/translator/input/cognito_template_with_new_properties.yaml new file mode 100644 index 0000000000..cdfb89112b --- /dev/null +++ b/tests/translator/input/cognito_template_with_new_properties.yaml @@ -0,0 +1,11 @@ +Transform: AWS::Serverless-2016-10-31 +Resources: + MyUserPool: + Type: AWS::Cognito::UserPool + Properties: + UserPoolTier: PLUS + UserPoolName: MyUserPool + EmailAuthenticationMessage: Your verification code is {####} + EmailAuthenticationSubject: Your verification code + WebAuthnRelyingPartyID: id + WebAuthnUserVerification: required diff --git a/tests/translator/output/aws-cn/cognito_template_with_new_properties.json b/tests/translator/output/aws-cn/cognito_template_with_new_properties.json new file mode 100644 index 0000000000..7869a8eda5 --- /dev/null +++ b/tests/translator/output/aws-cn/cognito_template_with_new_properties.json @@ -0,0 +1,15 @@ +{ + "Resources": { + "MyUserPool": { + "Properties": { + "EmailAuthenticationMessage": "Your verification code is {####}", + "EmailAuthenticationSubject": "Your verification code", + "UserPoolName": "MyUserPool", + "UserPoolTier": "PLUS", + "WebAuthnRelyingPartyID": "id", + "WebAuthnUserVerification": "required" + }, + "Type": "AWS::Cognito::UserPool" + } + } +} diff --git a/tests/translator/output/aws-us-gov/cognito_template_with_new_properties.json b/tests/translator/output/aws-us-gov/cognito_template_with_new_properties.json new file mode 100644 index 0000000000..7869a8eda5 --- /dev/null +++ b/tests/translator/output/aws-us-gov/cognito_template_with_new_properties.json @@ -0,0 +1,15 @@ +{ + "Resources": { + "MyUserPool": { + "Properties": { + "EmailAuthenticationMessage": "Your verification code is {####}", + "EmailAuthenticationSubject": "Your verification code", + "UserPoolName": "MyUserPool", + "UserPoolTier": "PLUS", + "WebAuthnRelyingPartyID": "id", + "WebAuthnUserVerification": "required" + }, + "Type": "AWS::Cognito::UserPool" + } + } +} diff --git a/tests/translator/output/cognito_template_with_new_properties.json b/tests/translator/output/cognito_template_with_new_properties.json new file mode 100644 index 0000000000..7869a8eda5 --- /dev/null +++ b/tests/translator/output/cognito_template_with_new_properties.json @@ -0,0 +1,15 @@ +{ + "Resources": { + "MyUserPool": { + "Properties": { + "EmailAuthenticationMessage": "Your verification code is {####}", + "EmailAuthenticationSubject": "Your verification code", + "UserPoolName": "MyUserPool", + "UserPoolTier": "PLUS", + "WebAuthnRelyingPartyID": "id", + "WebAuthnUserVerification": "required" + }, + "Type": "AWS::Cognito::UserPool" + } + } +}