@quantcdn/pulumi-quant 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +1 -0
- package/Pulumi.yaml +3 -0
- package/README.md +4 -0
- package/application.ts +281 -0
- package/config/index.ts +5 -0
- package/config/vars.ts +108 -0
- package/crawler.ts +493 -0
- package/crawlerSchedule.ts +214 -0
- package/cronJob.ts +215 -0
- package/domain.ts +144 -0
- package/environment.ts +287 -0
- package/getProject.ts +54 -0
- package/getProjects.ts +29 -0
- package/header.ts +97 -0
- package/index.ts +189 -0
- package/kvItem.ts +165 -0
- package/kvStore.ts +122 -0
- package/package.json +31 -0
- package/project.ts +214 -0
- package/provider.ts +128 -0
- package/ruleAuth.ts +397 -0
- package/ruleBotChallenge.ts +406 -0
- package/ruleContentFilter.ts +378 -0
- package/ruleCustomResponse.ts +420 -0
- package/ruleFunction.ts +378 -0
- package/ruleHeaders.ts +378 -0
- package/ruleProxy.ts +687 -0
- package/ruleRedirect.ts +365 -0
- package/ruleServeStatic.ts +378 -0
- package/tsconfig.json +47 -0
- package/types/index.ts +13 -0
- package/types/input.ts +585 -0
- package/types/output.ts +591 -0
- package/utilities.ts +96 -0
- package/volume.ts +210 -0
package/ruleFunction.ts
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as inputs from "./types/input";
|
|
6
|
+
import * as outputs from "./types/output";
|
|
7
|
+
import * as utilities from "./utilities";
|
|
8
|
+
|
|
9
|
+
export class RuleFunction extends pulumi.CustomResource {
|
|
10
|
+
/**
|
|
11
|
+
* Get an existing RuleFunction resource's state with the given name, ID, and optional extra
|
|
12
|
+
* properties used to qualify the lookup.
|
|
13
|
+
*
|
|
14
|
+
* @param name The _unique_ name of the resulting resource.
|
|
15
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
16
|
+
* @param state Any extra arguments used during the lookup.
|
|
17
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
18
|
+
*/
|
|
19
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RuleFunctionState, opts?: pulumi.CustomResourceOptions): RuleFunction {
|
|
20
|
+
return new RuleFunction(name, <any>state, { ...opts, id: id });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
public static readonly __pulumiType = 'quant:index:RuleFunction';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Returns true if the given object is an instance of RuleFunction. This is designed to work even
|
|
28
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
29
|
+
*/
|
|
30
|
+
public static isInstance(obj: any): obj is RuleFunction {
|
|
31
|
+
if (obj === undefined || obj === null) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
return obj['__pulumiType'] === RuleFunction.__pulumiType;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Rule action
|
|
39
|
+
*/
|
|
40
|
+
declare public /*out*/ readonly action: pulumi.Output<string>;
|
|
41
|
+
declare public /*out*/ readonly actionConfig: pulumi.Output<outputs.RuleFunctionActionConfig>;
|
|
42
|
+
/**
|
|
43
|
+
* Country filter type (country_is, country_is_not, any)
|
|
44
|
+
*/
|
|
45
|
+
declare public readonly country: pulumi.Output<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Allowed countries
|
|
48
|
+
*/
|
|
49
|
+
declare public readonly countryIs: pulumi.Output<string[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Excluded countries
|
|
52
|
+
*/
|
|
53
|
+
declare public readonly countryIsNots: pulumi.Output<string[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Whether rule is disabled
|
|
56
|
+
*/
|
|
57
|
+
declare public readonly disabled: pulumi.Output<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* Domain patterns (default: any)
|
|
60
|
+
*/
|
|
61
|
+
declare public readonly domains: pulumi.Output<string[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Function UUID
|
|
64
|
+
*/
|
|
65
|
+
declare public readonly fnUuid: pulumi.Output<string>;
|
|
66
|
+
/**
|
|
67
|
+
* IP filter type (ip_is, ip_is_not, any)
|
|
68
|
+
*/
|
|
69
|
+
declare public readonly ip: pulumi.Output<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Allowed IP addresses
|
|
72
|
+
*/
|
|
73
|
+
declare public readonly ipIs: pulumi.Output<string[]>;
|
|
74
|
+
/**
|
|
75
|
+
* Excluded IP addresses
|
|
76
|
+
*/
|
|
77
|
+
declare public readonly ipIsNots: pulumi.Output<string[]>;
|
|
78
|
+
/**
|
|
79
|
+
* Method filter type (method_is, method_is_not, any)
|
|
80
|
+
*/
|
|
81
|
+
declare public readonly method: pulumi.Output<string>;
|
|
82
|
+
/**
|
|
83
|
+
* Allowed HTTP methods
|
|
84
|
+
*/
|
|
85
|
+
declare public readonly methodIs: pulumi.Output<string[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Excluded HTTP methods
|
|
88
|
+
*/
|
|
89
|
+
declare public readonly methodIsNots: pulumi.Output<string[]>;
|
|
90
|
+
/**
|
|
91
|
+
* Rule name
|
|
92
|
+
*/
|
|
93
|
+
declare public readonly name: pulumi.Output<string>;
|
|
94
|
+
/**
|
|
95
|
+
* Only apply with cookie
|
|
96
|
+
*/
|
|
97
|
+
declare public /*out*/ readonly onlyWithCookie: pulumi.Output<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Organization identifier
|
|
100
|
+
*/
|
|
101
|
+
declare public readonly organization: pulumi.Output<string>;
|
|
102
|
+
/**
|
|
103
|
+
* Project identifier
|
|
104
|
+
*/
|
|
105
|
+
declare public readonly project: pulumi.Output<string>;
|
|
106
|
+
/**
|
|
107
|
+
* Rule identifier
|
|
108
|
+
*/
|
|
109
|
+
declare public readonly rule: pulumi.Output<string>;
|
|
110
|
+
/**
|
|
111
|
+
* Rule ID
|
|
112
|
+
*/
|
|
113
|
+
declare public /*out*/ readonly ruleId: pulumi.Output<string>;
|
|
114
|
+
/**
|
|
115
|
+
* URL patterns
|
|
116
|
+
*/
|
|
117
|
+
declare public readonly urls: pulumi.Output<string[]>;
|
|
118
|
+
/**
|
|
119
|
+
* Rule UUID
|
|
120
|
+
*/
|
|
121
|
+
declare public readonly uuid: pulumi.Output<string>;
|
|
122
|
+
/**
|
|
123
|
+
* Rule weight
|
|
124
|
+
*/
|
|
125
|
+
declare public readonly weight: pulumi.Output<number>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Create a RuleFunction resource with the given unique name, arguments, and options.
|
|
129
|
+
*
|
|
130
|
+
* @param name The _unique_ name of the resource.
|
|
131
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
132
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
133
|
+
*/
|
|
134
|
+
constructor(name: string, args: RuleFunctionArgs, opts?: pulumi.CustomResourceOptions)
|
|
135
|
+
constructor(name: string, argsOrState?: RuleFunctionArgs | RuleFunctionState, opts?: pulumi.CustomResourceOptions) {
|
|
136
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
137
|
+
opts = opts || {};
|
|
138
|
+
if (opts.id) {
|
|
139
|
+
const state = argsOrState as RuleFunctionState | undefined;
|
|
140
|
+
resourceInputs["action"] = state?.action;
|
|
141
|
+
resourceInputs["actionConfig"] = state?.actionConfig;
|
|
142
|
+
resourceInputs["country"] = state?.country;
|
|
143
|
+
resourceInputs["countryIs"] = state?.countryIs;
|
|
144
|
+
resourceInputs["countryIsNots"] = state?.countryIsNots;
|
|
145
|
+
resourceInputs["disabled"] = state?.disabled;
|
|
146
|
+
resourceInputs["domains"] = state?.domains;
|
|
147
|
+
resourceInputs["fnUuid"] = state?.fnUuid;
|
|
148
|
+
resourceInputs["ip"] = state?.ip;
|
|
149
|
+
resourceInputs["ipIs"] = state?.ipIs;
|
|
150
|
+
resourceInputs["ipIsNots"] = state?.ipIsNots;
|
|
151
|
+
resourceInputs["method"] = state?.method;
|
|
152
|
+
resourceInputs["methodIs"] = state?.methodIs;
|
|
153
|
+
resourceInputs["methodIsNots"] = state?.methodIsNots;
|
|
154
|
+
resourceInputs["name"] = state?.name;
|
|
155
|
+
resourceInputs["onlyWithCookie"] = state?.onlyWithCookie;
|
|
156
|
+
resourceInputs["organization"] = state?.organization;
|
|
157
|
+
resourceInputs["project"] = state?.project;
|
|
158
|
+
resourceInputs["rule"] = state?.rule;
|
|
159
|
+
resourceInputs["ruleId"] = state?.ruleId;
|
|
160
|
+
resourceInputs["urls"] = state?.urls;
|
|
161
|
+
resourceInputs["uuid"] = state?.uuid;
|
|
162
|
+
resourceInputs["weight"] = state?.weight;
|
|
163
|
+
} else {
|
|
164
|
+
const args = argsOrState as RuleFunctionArgs | undefined;
|
|
165
|
+
if (args?.domains === undefined && !opts.urn) {
|
|
166
|
+
throw new Error("Missing required property 'domains'");
|
|
167
|
+
}
|
|
168
|
+
if (args?.fnUuid === undefined && !opts.urn) {
|
|
169
|
+
throw new Error("Missing required property 'fnUuid'");
|
|
170
|
+
}
|
|
171
|
+
if (args?.urls === undefined && !opts.urn) {
|
|
172
|
+
throw new Error("Missing required property 'urls'");
|
|
173
|
+
}
|
|
174
|
+
resourceInputs["country"] = args?.country;
|
|
175
|
+
resourceInputs["countryIs"] = args?.countryIs;
|
|
176
|
+
resourceInputs["countryIsNots"] = args?.countryIsNots;
|
|
177
|
+
resourceInputs["disabled"] = args?.disabled;
|
|
178
|
+
resourceInputs["domains"] = args?.domains;
|
|
179
|
+
resourceInputs["fnUuid"] = args?.fnUuid;
|
|
180
|
+
resourceInputs["ip"] = args?.ip;
|
|
181
|
+
resourceInputs["ipIs"] = args?.ipIs;
|
|
182
|
+
resourceInputs["ipIsNots"] = args?.ipIsNots;
|
|
183
|
+
resourceInputs["method"] = args?.method;
|
|
184
|
+
resourceInputs["methodIs"] = args?.methodIs;
|
|
185
|
+
resourceInputs["methodIsNots"] = args?.methodIsNots;
|
|
186
|
+
resourceInputs["name"] = args?.name;
|
|
187
|
+
resourceInputs["organization"] = args?.organization;
|
|
188
|
+
resourceInputs["project"] = args?.project;
|
|
189
|
+
resourceInputs["rule"] = args?.rule;
|
|
190
|
+
resourceInputs["urls"] = args?.urls;
|
|
191
|
+
resourceInputs["uuid"] = args?.uuid;
|
|
192
|
+
resourceInputs["weight"] = args?.weight;
|
|
193
|
+
resourceInputs["action"] = undefined /*out*/;
|
|
194
|
+
resourceInputs["actionConfig"] = undefined /*out*/;
|
|
195
|
+
resourceInputs["onlyWithCookie"] = undefined /*out*/;
|
|
196
|
+
resourceInputs["ruleId"] = undefined /*out*/;
|
|
197
|
+
}
|
|
198
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
199
|
+
super(RuleFunction.__pulumiType, name, resourceInputs, opts);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Input properties used for looking up and filtering RuleFunction resources.
|
|
205
|
+
*/
|
|
206
|
+
export interface RuleFunctionState {
|
|
207
|
+
/**
|
|
208
|
+
* Rule action
|
|
209
|
+
*/
|
|
210
|
+
action?: pulumi.Input<string>;
|
|
211
|
+
actionConfig?: pulumi.Input<inputs.RuleFunctionActionConfig>;
|
|
212
|
+
/**
|
|
213
|
+
* Country filter type (country_is, country_is_not, any)
|
|
214
|
+
*/
|
|
215
|
+
country?: pulumi.Input<string>;
|
|
216
|
+
/**
|
|
217
|
+
* Allowed countries
|
|
218
|
+
*/
|
|
219
|
+
countryIs?: pulumi.Input<pulumi.Input<string>[]>;
|
|
220
|
+
/**
|
|
221
|
+
* Excluded countries
|
|
222
|
+
*/
|
|
223
|
+
countryIsNots?: pulumi.Input<pulumi.Input<string>[]>;
|
|
224
|
+
/**
|
|
225
|
+
* Whether rule is disabled
|
|
226
|
+
*/
|
|
227
|
+
disabled?: pulumi.Input<boolean>;
|
|
228
|
+
/**
|
|
229
|
+
* Domain patterns (default: any)
|
|
230
|
+
*/
|
|
231
|
+
domains?: pulumi.Input<pulumi.Input<string>[]>;
|
|
232
|
+
/**
|
|
233
|
+
* Function UUID
|
|
234
|
+
*/
|
|
235
|
+
fnUuid?: pulumi.Input<string>;
|
|
236
|
+
/**
|
|
237
|
+
* IP filter type (ip_is, ip_is_not, any)
|
|
238
|
+
*/
|
|
239
|
+
ip?: pulumi.Input<string>;
|
|
240
|
+
/**
|
|
241
|
+
* Allowed IP addresses
|
|
242
|
+
*/
|
|
243
|
+
ipIs?: pulumi.Input<pulumi.Input<string>[]>;
|
|
244
|
+
/**
|
|
245
|
+
* Excluded IP addresses
|
|
246
|
+
*/
|
|
247
|
+
ipIsNots?: pulumi.Input<pulumi.Input<string>[]>;
|
|
248
|
+
/**
|
|
249
|
+
* Method filter type (method_is, method_is_not, any)
|
|
250
|
+
*/
|
|
251
|
+
method?: pulumi.Input<string>;
|
|
252
|
+
/**
|
|
253
|
+
* Allowed HTTP methods
|
|
254
|
+
*/
|
|
255
|
+
methodIs?: pulumi.Input<pulumi.Input<string>[]>;
|
|
256
|
+
/**
|
|
257
|
+
* Excluded HTTP methods
|
|
258
|
+
*/
|
|
259
|
+
methodIsNots?: pulumi.Input<pulumi.Input<string>[]>;
|
|
260
|
+
/**
|
|
261
|
+
* Rule name
|
|
262
|
+
*/
|
|
263
|
+
name?: pulumi.Input<string>;
|
|
264
|
+
/**
|
|
265
|
+
* Only apply with cookie
|
|
266
|
+
*/
|
|
267
|
+
onlyWithCookie?: pulumi.Input<string>;
|
|
268
|
+
/**
|
|
269
|
+
* Organization identifier
|
|
270
|
+
*/
|
|
271
|
+
organization?: pulumi.Input<string>;
|
|
272
|
+
/**
|
|
273
|
+
* Project identifier
|
|
274
|
+
*/
|
|
275
|
+
project?: pulumi.Input<string>;
|
|
276
|
+
/**
|
|
277
|
+
* Rule identifier
|
|
278
|
+
*/
|
|
279
|
+
rule?: pulumi.Input<string>;
|
|
280
|
+
/**
|
|
281
|
+
* Rule ID
|
|
282
|
+
*/
|
|
283
|
+
ruleId?: pulumi.Input<string>;
|
|
284
|
+
/**
|
|
285
|
+
* URL patterns
|
|
286
|
+
*/
|
|
287
|
+
urls?: pulumi.Input<pulumi.Input<string>[]>;
|
|
288
|
+
/**
|
|
289
|
+
* Rule UUID
|
|
290
|
+
*/
|
|
291
|
+
uuid?: pulumi.Input<string>;
|
|
292
|
+
/**
|
|
293
|
+
* Rule weight
|
|
294
|
+
*/
|
|
295
|
+
weight?: pulumi.Input<number>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* The set of arguments for constructing a RuleFunction resource.
|
|
300
|
+
*/
|
|
301
|
+
export interface RuleFunctionArgs {
|
|
302
|
+
/**
|
|
303
|
+
* Country filter type (country_is, country_is_not, any)
|
|
304
|
+
*/
|
|
305
|
+
country?: pulumi.Input<string>;
|
|
306
|
+
/**
|
|
307
|
+
* Allowed countries
|
|
308
|
+
*/
|
|
309
|
+
countryIs?: pulumi.Input<pulumi.Input<string>[]>;
|
|
310
|
+
/**
|
|
311
|
+
* Excluded countries
|
|
312
|
+
*/
|
|
313
|
+
countryIsNots?: pulumi.Input<pulumi.Input<string>[]>;
|
|
314
|
+
/**
|
|
315
|
+
* Whether rule is disabled
|
|
316
|
+
*/
|
|
317
|
+
disabled?: pulumi.Input<boolean>;
|
|
318
|
+
/**
|
|
319
|
+
* Domain patterns (default: any)
|
|
320
|
+
*/
|
|
321
|
+
domains: pulumi.Input<pulumi.Input<string>[]>;
|
|
322
|
+
/**
|
|
323
|
+
* Function UUID
|
|
324
|
+
*/
|
|
325
|
+
fnUuid: pulumi.Input<string>;
|
|
326
|
+
/**
|
|
327
|
+
* IP filter type (ip_is, ip_is_not, any)
|
|
328
|
+
*/
|
|
329
|
+
ip?: pulumi.Input<string>;
|
|
330
|
+
/**
|
|
331
|
+
* Allowed IP addresses
|
|
332
|
+
*/
|
|
333
|
+
ipIs?: pulumi.Input<pulumi.Input<string>[]>;
|
|
334
|
+
/**
|
|
335
|
+
* Excluded IP addresses
|
|
336
|
+
*/
|
|
337
|
+
ipIsNots?: pulumi.Input<pulumi.Input<string>[]>;
|
|
338
|
+
/**
|
|
339
|
+
* Method filter type (method_is, method_is_not, any)
|
|
340
|
+
*/
|
|
341
|
+
method?: pulumi.Input<string>;
|
|
342
|
+
/**
|
|
343
|
+
* Allowed HTTP methods
|
|
344
|
+
*/
|
|
345
|
+
methodIs?: pulumi.Input<pulumi.Input<string>[]>;
|
|
346
|
+
/**
|
|
347
|
+
* Excluded HTTP methods
|
|
348
|
+
*/
|
|
349
|
+
methodIsNots?: pulumi.Input<pulumi.Input<string>[]>;
|
|
350
|
+
/**
|
|
351
|
+
* Rule name
|
|
352
|
+
*/
|
|
353
|
+
name?: pulumi.Input<string>;
|
|
354
|
+
/**
|
|
355
|
+
* Organization identifier
|
|
356
|
+
*/
|
|
357
|
+
organization?: pulumi.Input<string>;
|
|
358
|
+
/**
|
|
359
|
+
* Project identifier
|
|
360
|
+
*/
|
|
361
|
+
project?: pulumi.Input<string>;
|
|
362
|
+
/**
|
|
363
|
+
* Rule identifier
|
|
364
|
+
*/
|
|
365
|
+
rule?: pulumi.Input<string>;
|
|
366
|
+
/**
|
|
367
|
+
* URL patterns
|
|
368
|
+
*/
|
|
369
|
+
urls: pulumi.Input<pulumi.Input<string>[]>;
|
|
370
|
+
/**
|
|
371
|
+
* Rule UUID
|
|
372
|
+
*/
|
|
373
|
+
uuid?: pulumi.Input<string>;
|
|
374
|
+
/**
|
|
375
|
+
* Rule weight
|
|
376
|
+
*/
|
|
377
|
+
weight?: pulumi.Input<number>;
|
|
378
|
+
}
|