本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
AWS-RunCfnLint
描述
该文档使用 AWS CloudFormation Lintercfn-python-lint
) 根据 AWS CloudFormation 资源规范验证 YAML 和 JSON 模板。AWS-RunCfnLint
文档执行其他检查,例如确保为资源属性输入了有效的值。如果验证失败,RunCfnLintAgainstTemplate
步骤将失败,并且在错误消息中提供 linter 工具的输出。该 Automation 文档使用 cfn-lint v0.24.4。
文档类型
Automation
所有者
Amazon
平台
Linux、macOS、Windows
参数
-
AutomationAssumeRole
类型:字符串
说明:(可选)允许 Systems Manager Automation 代表您执行操作的 AWS Identity and Access Management (IAM) 角色的 Amazon 资源名称 (ARN)。如果未指定任何角色,则 Systems Manager Automation 使用运行此文档的用户的权限。
-
ConfigureRuleFlag
类型: 字符串
描述:(Optional) Configuration options for a rule to pass to the
--configure-rule
parameter.例如:E2001:strict=false,E3012:strict=false.
-
FormatFlag
类型: 字符串
描述:(Optional) Value to pass to the
--format
parameter to specify the output format.有效值:Default | quiet | parseable | json
默认值:默认值
-
IgnoreChecksFlag
类型: 字符串
描述:(Optional) IDs of rules to pass to the --ignore-checks parameter. 不会检查这些规则。
例如:E1001,E1003,W7001
-
IncludeChecksFlag
类型: 字符串
描述:(Optional) IDs of rules to pass to the
--include-checks
parameter. 将检查这些规则。例如:E1001,E1003,W7001
-
InfoFlag
类型: 字符串
描述:(Optional) Option for the
--info
parameter. 包括启用有关模板处理的其他日志记录信息的选项。默认值:False
-
TemplateFileName
类型: 字符串
描述:The name, or key, of the template file in the S3 bucket.
-
TemplateS3BucketName
类型: 字符串
描述:The name of the S3 bucket containing the packer template.
-
RegionsFlag
类型: 字符串
描述:(Optional) Values to pass to the for
--regions
parameter to test the template against specified AWS Regions.示例:us-east-1,us-west-1
文档步骤
RunCfnLintAgainstTemplate – Runs the cfn-python-lint
tool against the specified AWS CloudFormation template.
输出
RunCfnLintAgainstTemplate.output – The stdout from the cfn-python-lint
tool.