gpt4 book ai didi

amazon-web-services - 将事件规则负载配置为参数化存储桶

转载 作者:行者123 更新时间:2023-12-03 07:33:55 25 4
gpt4 key购买 nike

我正在定义 BucketName ,它将用户输入作为由“,”分隔的存储桶列表。我想在 EventRule 的请求参数部分使用这些存储桶

Description: Template to create AWS Event Bridge
Parameters:
BucketName:
Type: String
Default: "Enter Bucket Name1,BucketName2"

Resources:

EventRule:
Type: AWS::Events::Rule
Properties:
Description: "EventRule"
State: "ENABLED"
EventPattern:
source:
- aws.s3
detail:
eventSource:
- "s3.amazonaws.com"
eventName:
- PutObject
- DeleteObject
requestParameters:
bucketName:
- Fun::Split: [",", !Ref BucketName]

但它抛出以下错误消息

事件模式无效。原因:无法识别的匹配类型 Fun::Split at [Source: (String)"{"source":["aws.s3"],"detail":{"eventSource":["s3.amazonaws.com"],"requestParameters":{"bucketName":[{"Fun::Split":[",",""abc,def""]}]},"eventName":["PutObject","DeleteObject"]}}";行:1,列:117](服务:AmazonCloudWatchEvents;状态代码:400;错误代码:InvalidEventPatternException;请求 ID:d80f531a-660d-4f4c-b9ab-70cb4507bf05;代理:null)

最佳答案

它应该是Fn::Splitm而不是Fun::Split

关于amazon-web-services - 将事件规则负载配置为参数化存储桶,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70682369/

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