0

我正在尝试通过 CFT 创建 Appflow,其中 TriggerType 已调度,并且我收到 ScheduleStartTime 的以下错误:资源处理程序返回消息:“提供的请求无效:AWS::AppFlow::FlowUpdate 流请求失败,原因是:[无法调度开始时间是过去。请将计划开始时间更新为将来的值。]

这是 CFT 中 Appflow 的一部分:

rVeevaCrmLly1SentEmailAppflow1:
    Type: AWS::AppFlow::Flow
    Condition: CreateDev
    Properties:
        Description: edb-commercial-veeva-crm-lly1-sent-email update from S3 to Salesforce
        DestinationFlowConfigList:
          - ConnectorType: Salesforce
            ConnectorProfileName: !Ref pConnectorProfileLLY1
            DestinationConnectorProperties:
              Salesforce:
                ErrorHandlingConfig:
                  BucketName: !Ref pBucketName
                  BucketPrefix: Write-back-2/error/
                  FailOnFirstError: TRUE
                Object: Sent_Email_vod__c
                IdFieldNames: [Id]
                WriteOperationType: UPDATE
        FlowName: edb-commercial-veeva-crm-lly1-sent-email-update
        KMSArn: !Ref pKMSArn
        SourceFlowConfig:
          ConnectorType: S3
          SourceConnectorProperties:
            S3:
              BucketName: !Ref pBucketName
              BucketPrefix: !Ref pBucketPrefixCRM
        Tags:
          - Key: pApplicationCi
            Value: !Ref pApplicationCi
          - Key: pCostCenter
            Value: !Ref pCostCenter
          - Key: pCostCenterApprover
            Value: !Ref pCostCenterApprover
          - Key: pDataClassification
            Value: !Ref pDataClassification
          - Key: pHipaa
            Value: !Ref pHipaa
          - Key: pLevel1BusinessArea
            Value: !Ref pLevel1BusinessArea
          - Key: pOrg
            Value: LLY1
          - Key: pPrimaryItContact
            Value: !Ref pPrimaryItContact
          - Key: pSystemCustodian
            Value: !Ref pSystemCustodian
          - Key: pSystemOwner
            Value: !Ref pSystemOwner
        Tasks:
          - ConnectorOperator:
              S3: PROJECTION
            SourceFields:
              - Status_vod__c
              - Lilly_Reason_1__c
              - Lilly_Reason_2__c
              - Lilly_Reason_3__c
              - Lilly_Reason_4__c
              - Lilly_Reason_5__c
              - Lilly_Reason_6__c
              - Lilly_Reason_7__c
              - Lilly_Reason_8__c
              - Lilly_Reason_9__c
              - Lilly_Reason_10__c
              - Lilly_Rejected_Text_1__c
              - Lilly_Rejected_Text_2__c
              - Lilly_Rejected_Text_3__c
              - Lilly_Rejected_Text_4__c
              - Lilly_Rejected_Text_5__c
              - Lilly_Rejected_Text_6__c
              - Lilly_Rejected_Text_7__c
              - Lilly_Rejected_Text_8__c
              - Lilly_Rejected_Text_9__c
              - Lilly_Rejected_Text_10__c
              - Id
            TaskType: Filter
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Status_vod__c
            SourceFields:
              - Status_vod__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_1__c
            SourceFields:
              - Lilly_Reason_1__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_2__c
            SourceFields:
              - Lilly_Reason_2__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_3__c
            SourceFields:
              - Lilly_Reason_3__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_4__c
            SourceFields:
              - Lilly_Reason_4__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_5__c
            SourceFields:
              - Lilly_Reason_5__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_6__c
            SourceFields:
              - Lilly_Reason_6__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_7__c
            SourceFields:
              - Lilly_Reason_7__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_8__c
            SourceFields:
              - Lilly_Reason_8__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_9__c
            SourceFields:
              - Lilly_Reason_9__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Reason_10__c
            SourceFields:
              - Lilly_Reason_10__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_1__c
            SourceFields:
              - Lilly_Rejected_Text_1__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_2__c
            SourceFields:
              - Lilly_Rejected_Text_2__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_3__c
            SourceFields:
              - Lilly_Rejected_Text_3__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_4__c
            SourceFields:
              - Lilly_Rejected_Text_4__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_5__c
            SourceFields:
              - Lilly_Rejected_Text_5__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_6__c
            SourceFields:
              - Lilly_Rejected_Text_6__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_7__c
            SourceFields:
              - Lilly_Rejected_Text_7__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_8__c
            SourceFields:
              - Lilly_Rejected_Text_8__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_9__c
            SourceFields:
              - Lilly_Rejected_Text_9__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Lilly_Rejected_Text_10__c
            SourceFields:
              - Lilly_Rejected_Text_10__c
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: textarea
            TaskType: Map
          - ConnectorOperator:
              S3: NO_OP
            DestinationField: Id
            SourceFields:
              - Id
            TaskProperties:
              - Key: DESTINATION_DATA_TYPE
                Value: picklist
            TaskType: Map
        TriggerConfig:
          TriggerProperties:
                    DataPullMode: Incremental
                    #ScheduleEndTime: Double
                    ScheduleExpression: "rate(1days)"
                    #ScheduleOffset: Double
                    ScheduleStartTime: 12.30
                    #TimeZone: "America/New_York"
          TriggerType: Scheduled
4

3 回答 3

0

ScheduleStartTime 需要一个 Unix 时间戳。例如,2022-01-19 01:00:00 将是 1642575600。请确保您的时间是未来。

于 2022-01-19T02:51:38.543 回答
0

给出日期和时间格式,如(DDMMYYYYHHSS)。例如,您想在 2022 年 1 月 15 日开始,请给出预定的开始时间,例如:(150120221300)。

于 2022-01-10T11:27:12.963 回答
0

将 Unix 时间戳传递给ScheduleStartTime是适当的方法。

扩展,通过命令行获取 Unix 时间戳,例如,提前 15 分钟now运行:date --date='now + 15 minutes' +%s

在这样做时,对于我的项目,我能够将 Makefile 中的值传递给sam deploy --parameter-overrides "AppFlowStart=$$(date --date='now + 15 minutes' +%s)"此参数在我的template.yamlas 类型Number中,然后在我的 AppFlow 资源的ScheduleStartTime.

在使用工作项目编写此答案时,我在最新版本的 Ubuntu Desktop 上使用最新版本的 AWS SAM 对此进行了测试。

于 2022-03-01T15:47:07.880 回答