gpt4 book ai didi

amazon-web-services - 属性验证失败 - AWS::Cognito::UserPool 的 Cloudformation 模板

转载 作者:行者123 更新时间:2023-12-03 07:38:34 28 4
gpt4 key购买 nike

当我运行我的 AWS::Cognito::UserPool 资源模板时,我在 cloudformation 中不断收到 属性验证失败 错误。脚本如下所示

Resources:
ESRVCognitoUserPool:
Type: "AWS::Cognito::UserPool"
Properties:
UserPoolName: !Sub '${AWS::StackName}-CognitoUserPool'
AdminCreateUserConfig:
AllowAdminCreateUserOnly: 'True'
UserPoolTags: !Sub '${AWS::StackName}'
Schema:
- Name: 'country_code'
AttributeDataType: 'String'
Mutable: 'true'
Required: 'false'
DeveloperOnlyAttribute: 'false'
StringAttributeConstraints:
MaxLength: '2048'
MinLength: '1'
- Name: "contact_id"
AttributeDataType: String
Mutable: 'true'
Required: 'false'
DeveloperOnlyAttribute: 'false'
StringAttributeConstraints:
MaxLength: '2048'
MinLength: '1'
- Name: "language"
AttributeDataType: String
Mutable: 'true'
Required: 'false'
DeveloperOnlyAttribute: 'false'
StringAttributeConstraints:
MaxLength: '256'
MinLength: '1'
- Name: "account_id"
AttributeDataType: String
Mutable: 'true'
Required: 'false'
DeveloperOnlyAttribute: 'false'
StringAttributeConstraints:
MaxLength: '2048'
MinLength: '1'
- Name: "tracking_id"
AttributeDataType: String
Mutable: 'true'
Required: 'false'
DeveloperOnlyAttribute: 'false'
StringAttributeConstraints:
MaxLength: '256'
MinLength: '1'
Outputs:
StackName:
Description: 'Stack name.'
Value: !Sub '${AWS::StackName}'
UserPoolInfo:
Description: 'UserPool Information'
Value: !Ref ESRVCognitoUserPool
Export:
Name: UserPool-ID

如果有任何提示,我将不胜感激。

最佳答案

根据documentation UserPoolTags 是 JSON 类型。不允许您向其传递简单的字符串。

查看此question关于如何正确传递值。

关于amazon-web-services - 属性验证失败 - AWS::Cognito::UserPool 的 Cloudformation 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75948162/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com