You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SSM文档schemaVersion 2.2中使用AllowedPattern报错求助

解决SSM文档AllowedPattern属性报错问题

问题出在属性名的大小写上:在schemaVersion 2.2的SSM文档中,参数的正则验证属性是小写开头的allowedPattern,而非你写的大写开头的AllowedPattern。YAML对属性名大小写敏感,系统无法识别不符合规范的大写开头属性,因此抛出InvalidDocumentContent错误。

修正后的文档内容如下:

schemaVersion: '2.2'
description: Cat file from temp
parameters:
  path:
    type: String
    description: path to file
    allowedPattern: ^\/tmp\/ssm-...$
mainSteps:
- action: aws:runShellScript
  name: runShellScript
  inputs:
    timeoutSeconds: '30'
    runCommand:
    - if [ -f {{ path }} ]; then cat {{ path }}; else echo None; fi

补充说明:部分旧版本的SSM文档schema(如1.0)可能使用大写开头的属性命名,但2.2版本已统一为驼峰小写开头的规范,和官方文档的最新定义保持一致。

内容的提问来源于stack exchange,提问作者Filip Stefanov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 20:05:24