amazon-web-services - 我可以在 TopicConfiguration 上为具有 OR 条件的 cloudformation s3 存储桶创建过滤器规则吗
问题描述
为了不重复代码,我希望能够创建一个带有 OR 条件的过滤器规则......如果任一条件为真,则满足过滤器。
这是我想避免的原始方式。
MyBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: myBuck
NotificationConfiguration:
TopicConfigurations:
- Event: 's3:ObjectCreated:*'
Filter:
S3Key:
Rules:
- Name: prefix
Value: data/abcd/
Topic: myTopicArnGoesHere
- Event: 's3:ObjectCreated:*'
Filter:
S3Key:
Rules:
- Name: prefix
Value: data/efgh/
Topic: myTopicArnGoesHere
相反,我希望有办法做这样的事情
NewBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: myBuck
VersioningConfiguration:
Status: Enabled
NotificationConfiguration:
TopicConfigurations:
- Event: 's3:ObjectCreated:*'
Filter:
S3Key:
Rules:
- Name: prefix
Value: data/abcd/
OR
- Name: prefix
Value: data/efgh/
Topic: myTopicArnGoesHere
解决方案
推荐阅读
- java - RDDs如何为自己拆分数据?
- ruby-on-rails - 设置to_param方法后无法创建嵌套资源
- ios - 如何获取我的 iOS 应用程序的本地化语言?
- python - python中的平均风数据(每小时10-10分钟)
- css - 如何从 CSS font-family 列表中知道浏览器使用哪种字体?
- firebase - 建立 Firebase 聊天室数据库很热门?
- jackrabbit - 长耳兔聚类
- javascript - 父项也切换子项
- hadoop - 如何强制datanode和resourcemanager使用IP而不是主机名?
- awk - 给定主机名,从 ~/.ssh/config 获取主机