gpt4 book ai didi

json - 属性 QueueConfigurations 的值必须是 List 类型

转载 作者:行者123 更新时间:2023-12-04 17:26:33 25 4
gpt4 key购买 nike

我正在尝试为我的 S3 存储桶编写 SQS 触发器。我遇到一个错误,提示“属性 QueueConfigurations 的值必须是列表类型。”我的缩进/格式有问题吗?还是内容错误?我最近不得不将其从 YAML 转录为 JSON,我真的可以用第二双眼睛来解决这个问题。请记住,下面的代码块如此缩进的原因是因为我有一些不应该发布的敏感信息。预先感谢!

          "NotificationConfiguration" : {
"QueueConfigurations" : {
"Id" : "1",
"Event" : "s3:ObjectCreated:*",
"Filter" : {
"S3Key" : {
"Rules" : {
"Name" : "prefix",
"Value" : "prod_hvr/cdc/"
}
}
},
"Queue" : "arn:aws:sqs:us-east-1:958262988361:interstate-cdc_feeder_prod_hvr_dev"
},
"QueueConfigurations" : {
"Id" : "2",
"Event" : "s3:ObjectCreated:*",
"Filter" : {
"S3Key" : {
"Rules" : {
"Name" : "prefix",
"Value" : "prod_hvr/latency/"
}
}
},
"Queue" : "arn:aws:sqs:us-east-1:958262988361:interstate-latency_hvr_dev"
}
}

最佳答案

应该像下面这样。根据此docs ,“Id”不是有效属性。

{
"NotificationConfiguration": {
"QueueConfigurations": [
{
"Event": "s3:ObjectCreated:*",
"Filter": {
"S3Key": {
"Rules": {
"Name": "prefix",
"Value": "prod_hvr/cdc/"
}
}
},
"Queue": "arn:aws:sqs:us-east-1:958262988361:interstate-cdc_feeder_prod_hvr_dev"
},
{
"Event": "s3:ObjectCreated:*",
"Filter": {
"S3Key": {
"Rules": {
"Name": "prefix",
"Value": "prod_hvr/latency/"
}
}
},
"Queue": "arn:aws:sqs:us-east-1:958262988361:interstate-latency_hvr_dev"
}
]
}
}

关于json - 属性 QueueConfigurations 的值必须是 List 类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62903092/

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