Мне нравится создавать пул пользователей когнитивных систем с помощью AWS-CDK версии 0.24.1 на основе Java. В течение cdk deploy
я получаю ошибку InvalidParameterException.
Служба: AWSCognitoIdentityProvider;
Код состояния: 400;
Код ошибки: InvalidParameterException: Cognito Invalid AttributeDataType input, рассмотрите возможность использования предоставленного Перечисление AttributeDataType
CfnUserPool userPool = new CfnUserPool(this, "cognito",
CfnUserPoolProps.builder()
.withAdminCreateUserConfig(
AdminCreateUserConfigProperty.builder()
.withAllowAdminCreateUserOnly(false)
.build())
.withPolicies(
PoliciesProperty.builder()
.withPasswordPolicy(
PasswordPolicyProperty.builder()
.withMinimumLength(6)
.withRequireLowercase(false)
.withRequireNumbers(false)
.withRequireSymbols(false)
.withRequireUppercase(false)
.build()
)
.build()
)
.withAutoVerifiedAttributes(Arrays.asList("email"))
.withSchema(Arrays.asList("email"))
.build());
Возможно, простой список строк .withAutoVerifiedAttributes(Arrays.asList("email"))
или .withSchema(Arrays.asList("email"))
неверен. Но, к сожалению, есть только список объектов, объявленных в сигнатуре метода, а не конкретный тип: public CfnUserPoolProps.Builder withAutoVerifiedAttributes(@Nullable List value)
.
Есть ли пример фрагмента для создания аналогичного пользовательского пула с использованием aws-cdk на основе Java.