RecoveryOptions - это часть RecoveryMechanism, которая является частью AccountRecoverySetting:
{
"RecoveryMechanisms" : [ RecoveryOption, ... ]
}
Здесь вы видите пример пула пользователей с параметрами восстановления, которые все вместе объединяются в шаблон CloudFormation, например:
testUserPool:
DependsOn: [ cognitoSMSRole ]
Type: AWS::Cognito::UserPool
Properties:
AccountRecoverySetting:
RecoveryMechanisms:
- Name: verified_email
Priority: 1
- Name: verified_phone_number
Priority: 2
AdminCreateUserConfig:
AllowAdminCreateUserOnly: False
AutoVerifiedAttributes:
- phone_number
EnabledMfas:
- SMS_MFA
MfaConfiguration: OPTIONAL
Policies:
PasswordPolicy:
MinimumLength: 8
RequireLowercase: True
RequireNumbers: True
RequireSymbols: True
RequireUppercase: True
TemporaryPasswordValidityDays: 7
Schema:
- AttributeDataType: String
DeveloperOnlyAttribute: False
Mutable: False
Name: name
Required: True
- AttributeDataType: String
DeveloperOnlyAttribute: False
Mutable: False
Name: last_name
Required: False
SmsConfiguration:
ExternalId: !Sub cognito-sms-role-prod
SnsCallerArn: !GetAtt cognitoSMSRole.Arn
UsernameAttributes:
- phone_number
UsernameConfiguration:
CaseSensitive: False
UserPoolName: !Sub UserPool-prod