diff --git a/spire/templates/apps/dovetail-metrics-export.yml b/spire/templates/apps/dovetail-metrics-export.yml index 28b97f31..c66ee4af 100644 --- a/spire/templates/apps/dovetail-metrics-export.yml +++ b/spire/templates/apps/dovetail-metrics-export.yml @@ -338,6 +338,45 @@ Resources: Principal: events.amazonaws.com SourceArn: !GetAtt WitfNetworkExport.Arn + WxxiNetworkExport: + Type: AWS::Events::Rule + Condition: EnableProductionRules + Properties: + Description: WXXI network data export + RoleArn: !GetAtt RulesRole.Arn + ScheduleExpression: cron(15 0 * * ? *) # 00:15 UTC every day + State: ENABLED + Targets: + - Arn: !GetAtt ExportFunction.Arn + Id: !Sub "${RootStackName}.Export.WXXINetwork" + Input: |- + { + "PodcastIDs": [ + 11214, + 11478, + 11479, + 11511, + 14910, + 15339, + 16824 + ], + "ObjectPrefix": "PRX/", + "Copies": [ + { + "Mode": "AWS/S3", + "BucketName": "wxxi-prx-dovetail-exports" + } + ] + } + WxxiNetworkExportInvokePermission: + Condition: EnableProductionRules + Type: AWS::Lambda::Permission + Properties: + Action: lambda:InvokeFunction + FunctionName: !Ref ExportFunction + Principal: events.amazonaws.com + SourceArn: !GetAtt WxxiNetworkExport.Arn + BoostrIntegration: Type: AWS::Events::Rule Condition: EnableProductionRules