-
Notifications
You must be signed in to change notification settings - Fork 4
/
schema.json
240 lines (240 loc) · 14.2 KB
/
schema.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
{
"$id": "https://raw.githubusercontent.com/roadrunner-server/sqs/refs/heads/master/schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "roadrunner-sqs",
"description": "The schema contains all the valid configuration parameters for the SQS plugin for the roadrunner job system.",
"definitions": {
"pipeline": {
"type": "object",
"required": ["driver"],
"additionalProperties": false,
"properties": {
"driver": {
"type": "string",
"enum": ["sqs"]
},
"config": {
"type": "object",
"description": "Configuration options for the SQS pipeline.",
"additionalProperties": false,
"properties": {
"priority": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
},
"prefetch": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
},
"skip_queue_declaration": {
"description": "Whether to skip creation of the SQS queue. If you set to this to `true`, the queue must already exist.",
"type": "boolean",
"default": false
},
"max_messages_in_flight": {
"description": "Maximum number of messages that can be in-flight at any given time. This is useful to limit the number of messages that are being processed concurrently. Default is the same value as `prefetch`.",
"type": "integer",
"default": 10
},
"visibility_timeout": {
"type": "integer",
"description": "The duration (in seconds) that a message received from a queue (by one consumer) will not be visible to the other message consumers. The visibility timeout begins when Amazon SQS returns a message. If the consumer fails to process and delete the message before the visibility timeout expires, the message becomes visible to other consumers. If a message must be received only once, your consumer must delete it within the duration of the visibility timeout.",
"default": 0
},
"error_visibility_timeout": {
"type": "integer",
"description": "The visibility timeout to set for jobs that fail (NACK). If you set this, you must also set `retain_failed_jobs` to `true`.",
"default": 0
},
"retain_failed_jobs": {
"type": "boolean",
"description": "Whether to keep failed (NACK'ed) jobs on the queue. By default, RR will delete and requeue failed jobs immediately. If you set this to `true`, RR does nothing to NACK'ed jobs on the queue and they will be consumed again after `visibility_timeout` or (`error_visibility_timeout`, if > 0) has passed. Jobs that are consumed multiple times will increment their receive count, which can be used to configure SQS to automatically move the jobs to a dead-letter queue.",
"default": false
},
"wait_time_seconds": {
"description": "The duration (in seconds) the call waits for a message to arrive in the queue before returning. If a message is available, the call returns immediately. If no messages are available and the wait time expires, the call returns with an empty list of messages",
"type": "integer",
"default": 0,
"maximum": 20
},
"queue": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/queue"
},
"message_group_id": {
"description": "Message Group ID. See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageGroupId",
"type": "string",
"default": null
},
"attributes": {
"title": "AWS queue attributes. Attributes are only applied to the queue if RR creates it. Existing queues will not be modified. Must be any of the attributes listed here: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html.",
"type": "object",
"properties": {
"DelaySeconds": {
"description": "The length of time, in seconds, for which the delivery of all messages in the queue is delayed.",
"type": "integer",
"minimum": 0,
"maximum": 900,
"default": 0
},
"MaximumMessageSize": {
"description": "The limit of how many bytes a message can contain before Amazon SQS rejects it.",
"type": "integer",
"minimum": 1024,
"maximum": 262144,
"default": 262144
},
"MessageRetentionPeriod": {
"description": "The length of time, in seconds, for which Amazon SQS retains a message. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the Amazon SQS system. Changes made to the `MessageRetentionPeriod` attribute can take up to 15 minutes and will impact existing messages in the queue potentially causing them to be expired and deleted if the `MessageRetentionPeriod` is reduced below the age of existing messages.",
"type": "integer",
"minimum": 60,
"maximum": 1209600,
"default": 345600
},
"Policy": {
"description": "A valid AWS policy. See https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html for reference of this object structure."
},
"ReceiveMessageWaitTimeSeconds": {
"description": "The length of time, in seconds, for which a [`ReceiveMessage`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html) action waits for a message to arrive.",
"type": "integer",
"minimum": 0,
"maximum": 20,
"default": 0
},
"VisibilityTimeout": {
"description": "The visibility timeout for the queue, in seconds. For more information about the visibility timeout, see [Visibility Timeout](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) in the Amazon SQS Developer Guide.",
"type": "integer",
"minimum": 0,
"maximum": 43200,
"default": 30
},
"RedrivePolicy": {
"description": "**Dead-letter queues only.** The parameters for the dead-letter queue functionality of the source queue as a JSON object.",
"type": "object",
"properties": {
"deadLetterTargetArn": {
"type": "string",
"description": "The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of `maxReceiveCount` is exceeded.",
"examples": [
"arn:aws:sqs:us-east-2:123456789012:my_queue"
]
},
"maxReceiveCount": {
"type": "integer",
"description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue. When the `ReceiveCount` for a message exceeds the `maxReceiveCount` for a queue, Amazon SQS moves the message to the dead-letter-queue.",
"minimum": 1,
"default": 10
}
}
},
"RedriveAllowPolicy": {
"description": "**Dead-letter queues only.** The parameters for the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues.",
"type": "object",
"properties": {
"redrivePermission": {
"description": "The permission type that defines which source queues can specify the current queue as the dead-letter queue.",
"type": "string",
"enum": ["allowAll", "denyAll", "byQueue"]
},
"sourceQueueArns": {
"description": "The Amazon Resource Names (ARN)s of the source queues that can specify this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the `redrivePermission` parameter is set to `byQueue`. You can specify up to 10 source queue ARNs. To allow more than 10 source queues to specify dead-letter queues, set the `redrivePermission` parameter to `allowAll`.",
"type": "array",
"items": {
"type": "string",
"examples": [
"arn:aws:sqs:us-east-2:123456789012:my_queue",
"arn:aws:sqs:us-east-2:123456789012:my_queue2"
]
}
}
}
},
"ContentBasedDeduplication": {
"description": "**FIFO queues only.** Enables content-based deduplication. For more information, see [Exactly-once processing](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html) in the Amazon SQS Developer Guide.",
"type": "boolean",
"default": false
},
"DeduplicationScope": {
"description": "**High-throughput FIFO queues only.** Specifies whether message deduplication occurs at the message group or queue level.",
"type": "string",
"enum": ["messageGroup", "queue"]
},
"FifoThroughputLimit": {
"description": "**High-throughput FIFO queues only.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. The `perMessageGroupId` value is allowed only when the value for `DeduplicationScope` is `messageGroup`.",
"type": "string",
"enum": ["perQueue", "perMessageGroupId"]
},
"KmsMasterKeyId": {
"description": "**Applies only to server-side-encryption.** The ID of an AWS managed customer master key (CMK) for Amazon SQS or a custom CMK. While the alias of the AWS-managed CMK for Amazon SQS is always `alias/aws/sqs`, the alias of a custom CMK can, for example, be `alias/MyAlias`.",
"type": "string"
},
"KmsDataKeyReusePeriodSeconds": {
"description": "**Applies only to server-side-encryption.** The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours).",
"type": "integer",
"minimum": 60,
"maximum": 86400,
"default": 300
},
"SqsManagedSseEnabled": {
"type": "boolean",
"default": false,
"description": "**Applies only to server-side-encryption.** Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue."
}
}
},
"tags": {
"title": "Tags to associate with the queue. Please see https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html.",
"type": "object",
"additionalProperties": {
"type": "string",
"minLength": 1
}
}
}
}
}
},
"driver": {
"type": "object",
"additionalProperties": false,
"description": "Configuration options for the SQS driver.",
"properties": {
"key": {
"title": "AWS Access Key ID",
"description": "This is required unless your environment variables provide AWS credentials.",
"type": "string",
"examples": ["ASIAIOSFODNN7EXAMPLE"]
},
"secret": {
"title": "AWS Access Key Secret",
"description": "This is required unless your environment variables provide AWS credentials.",
"type": "string",
"examples": ["wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"]
},
"region": {
"title": "AWS Region",
"description": "The region to connect to. Must be one of the [supported regions](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions). This is required unless your environment variables provide an AWS region or you use a self-hosted queue.",
"type": "string",
"examples": [
"eu-central-1",
"us-west-1",
"ca-central-1",
"ap-northeast-1"
]
},
"session_token": {
"title": "AWS Session Token",
"description": "The short-lived session token to use. This should not be provided for production and has a maximum duration of 12 hours. In most cases, you don't need to provide this value.",
"type": "string"
},
"endpoint": {
"title": "Queue Endpoint",
"description": "The endpoint of your queue. You only need to provide this value if you use a self-hosted queue, as the endpoint will be resolved from the provided AWS Region and queue name otherwise.",
"type": "string",
"examples": ["http://127.0.0.1:9324"]
}
},
"dependentRequired": {
"key": ["secret"],
"secret": ["key"]
}
}
}
}