首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >云格式模板错误

云格式模板错误
EN

Stack Overflow用户
提问于 2018-03-19 20:45:01
回答 1查看 210关注 0票数 0

我说错了

3/19/2018,4:40:25 PM -模板包含错误。:模板错误:参数'LifecycleConfiguration‘MaxLength必须位于字符串类型的参数上。

这是我的密码。

代码语言:javascript
复制
AWSTemplateFormatVersion: 2010-09-09
Description: S3 Bucket Template for cloudformation
Metadata:
  Copyright:
    - 'Copyrights 2018, All rights reserved'
  Comments:
    - !Ref Description
Parameters:
  S3BucketName:
    Description: Name of the S3 Bucket
    Type: String
    ConstraintDescription: S3 BucketName must be between 3 and 63 characters in length.
    MinLength: 3
    MaxLength: 63
  LifecycleConfiguration:
    Description: >-
      Specify a number of days to keep files in the bucket, a value of 0 keeps
      the files in the s3
    Type: Number
    MinValue: '0'
    MaxLength: '365'
Resources:
  S3Bucket:
    Type: 'AWS::S3::Bucket'
    Properties:
      BucketName: !Ref S3BucketName
      LifecycleConfiguration:
        Rules:
          - Id: GlacierRule
            Prefix: glacier
            Status: Enabled
            ExpirationInDays: '365'
            Transitions:
              - TransitionInDays: '1'
                StorageClass: Glacier
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-03-19 21:39:27

代码语言:javascript
复制
 LifecycleConfiguration:
    Description: >-
      Specify a number of days to keep files in the bucket, a value of 0 keeps
      the files in the s3
    Type: Number
    MinValue: '0'
    MaxLength: '365'

使用MaxValue: 365而不是MaxLength: 365

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49372094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档