gpt4 book ai didi

amazon-web-services - 模板的资源 block 中 Unresolved 资源依赖性 [DefaultSchedule]

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

我正在使用 cloudformation 脚本来创建 AWS Data Pipeline。我已经根据文档创建了脚本,但我面临 1 个错误,即

Template validation error: Template format error: Unresolved resource dependencies [DefaultSchedule] in the Resources block of the template

这是我的脚本的资源部分:

Resources:
DataPipelineForS3Backup:
Type: AWS::DataPipeline::Pipeline
Properties:
Name:
Ref: S3BackupDataPipeline
Description:
Ref: S3BackupDataPipeline
Activate: 'true'
ParameterObjects:
- Id: myAwsCliCommand
Attributes:
- Key: description
StringValue: Dp command to run
- Key: type
StringValue: String
ParameterValues:
- Id: myAwsCliCommand
StringValue:
Ref: AwsCliCommand
PipelineObjects:
- Id: DefaultSchedule
Name: Every 1 day
Fields:
- Key: type
StringValue: Schedule
- Key: period
StringValue: 1 Day
- Key: startDateTime
StringValue: 2018-08-08T19:00:00
- Id: Default
Name: Default
Fields:
- Key: failureAndRerunMode
StringValue: CASCADE
- Key: type
StringValue: Default
- Key: resourceRole
StringValue:
Ref: S3BackupResourceRole
- Key: pipelineLogUri
StringValue:
Ref: S3BackupDpLogUri
- Key: role
StringValue:
Ref: S3BackupDpRole
- Key: scheduleType
StringValue: cron
- Key: schedule
StringValue:
Ref: DefaultSchedule

谁能告诉我剧本是怎么回事?谢谢

最佳答案

首先,在使用 YAML 编写脚本时,您应该非常小心缩进以避免错误。它应该是这样的:

Resources:
DataPipelineForS3Backup:
Type: AWS::DataPipeline::Pipeline
Properties:
Name:
...

此外,据我了解,您正在尝试获取 PipelineObjects 之一的引用。为此,您应该使用 RefValue: DefaultSchedule

,而不是 Ref: DefaultSchedule

请参阅文档中的示例:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#w2ab2c21c10d332c13

关于amazon-web-services - 模板的资源 block 中 Unresolved 资源依赖性 [DefaultSchedule],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51752549/

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