-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
channel.json
264 lines (264 loc) · 8.61 KB
/
channel.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json",
"title": "Channel Schema",
"description": "This object contains information about the channel representation in SQS.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"queue": {
"description": "A definition of the queue that will be used as the channel.",
"$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue"
},
"deadLetterQueue": {
"description": "A definition of the queue that will be used for un-processable messages.",
"$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue"
},
"bindingVersion": {
"type": "string",
"enum": [
"0.1.0",
"0.2.0"
],
"description": "The version of this binding. If omitted, 'latest' MUST be assumed.",
"default": "latest"
}
},
"required": [
"queue"
],
"definitions": {
"queue": {
"type": "object",
"description": "A definition of a queue.",
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"name": {
"type": "string",
"description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field."
},
"fifoQueue": {
"type": "boolean",
"description": "Is this a FIFO queue?",
"default": false
},
"deduplicationScope": {
"type": "string",
"enum": ["queue", "messageGroup"],
"description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).",
"default": "queue"
},
"fifoThroughputLimit": {
"type": "string",
"enum": ["perQueue", "perMessageGroupId"],
"description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.",
"default": "perQueue"
},
"deliveryDelay": {
"type": "integer",
"description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.",
"minimum": 0,
"maximum": 15,
"default": 0
},
"visibilityTimeout": {
"type": "integer",
"description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.",
"minimum": 0,
"maximum": 43200,
"default": 30
},
"receiveMessageWaitTime": {
"type": "integer",
"description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.",
"default": 0
},
"messageRetentionPeriod": {
"type": "integer",
"description": "How long to retain a message on the queue in seconds, unless deleted.",
"minimum": 60,
"maximum": 1209600,
"default": 345600
},
"redrivePolicy": {
"$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/redrivePolicy"
},
"policy": {
"$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/policy"
},
"tags": {
"type": "object",
"description": "Key-value pairs that represent AWS tags on the queue."
}
},
"required": [
"name",
"fifoQueue"
]
},
"redrivePolicy": {
"type": "object",
"description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.",
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"deadLetterQueue": {
"$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/identifier"
},
"maxReceiveCount": {
"type": "integer",
"description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.",
"default": 10
}
},
"required": [
"deadLetterQueue"
]
},
"identifier": {
"type": "object",
"description": "The SQS queue to use as a dead letter queue (DLQ).",
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"arn": {
"type": "string",
"description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}"
},
"name": {
"type": "string",
"description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding."
}
}
},
"policy": {
"type": "object",
"description": "The security policy for the SQS Queue",
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"statements": {
"type": "array",
"description": "An array of statement objects, each of which controls a permission for this queue.",
"items": {
"$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/statement"
}
}
},
"required": [
"statements"
]
},
"statement": {
"type": "object",
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"effect": {
"type": "string",
"enum": [
"Allow",
"Deny"
]
},
"principal": {
"description": "The AWS account or resource ARN that this statement applies to.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"action": {
"description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"required": [
"effect",
"principal",
"action"
]
}
},
"examples": [
{
"queue": {
"name": "myQueue",
"fifoQueue": true,
"deduplicationScope": "messageGroup",
"fifoThroughputLimit": "perMessageGroupId",
"deliveryDelay": 15,
"visibilityTimeout": 60,
"receiveMessageWaitTime": 0,
"messageRetentionPeriod": 86400,
"redrivePolicy": {
"deadLetterQueue": {
"arn": "arn:aws:SQS:eu-west-1:0000000:123456789"
},
"maxReceiveCount": 15
},
"policy": {
"statements": [
{
"effect": "Deny",
"principal": "arn:aws:iam::123456789012:user/dec.kolakowski",
"action": [
"sqs:SendMessage",
"sqs:ReceiveMessage"
]
}
]
},
"tags": {
"owner": "AsyncAPI.NET",
"platform": "AsyncAPIOrg"
}
},
"deadLetterQueue": {
"name": "myQueue_error",
"deliveryDelay": 0,
"visibilityTimeout": 0,
"receiveMessageWaitTime": 0,
"messageRetentionPeriod": 604800
}
}
]
}