@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/ruleAuth.ts ADDED
@@ -0,0 +1,397 @@
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 RuleAuth extends pulumi.CustomResource {
10
+ /**
11
+ * Get an existing RuleAuth 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?: RuleAuthState, opts?: pulumi.CustomResourceOptions): RuleAuth {
20
+ return new RuleAuth(name, <any>state, { ...opts, id: id });
21
+ }
22
+
23
+ /** @internal */
24
+ public static readonly __pulumiType = 'quant:index:RuleAuth';
25
+
26
+ /**
27
+ * Returns true if the given object is an instance of RuleAuth. 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 RuleAuth {
31
+ if (obj === undefined || obj === null) {
32
+ return false;
33
+ }
34
+ return obj['__pulumiType'] === RuleAuth.__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.RuleAuthActionConfig>;
42
+ /**
43
+ * Authentication password
44
+ */
45
+ declare public readonly authPass: pulumi.Output<string>;
46
+ /**
47
+ * Authentication username
48
+ */
49
+ declare public readonly authUser: pulumi.Output<string>;
50
+ /**
51
+ * Country filter type (country_is, country_is_not, any)
52
+ */
53
+ declare public readonly country: pulumi.Output<string>;
54
+ /**
55
+ * Allowed countries
56
+ */
57
+ declare public readonly countryIs: pulumi.Output<string[]>;
58
+ /**
59
+ * Excluded countries
60
+ */
61
+ declare public readonly countryIsNots: pulumi.Output<string[]>;
62
+ /**
63
+ * Whether rule is disabled
64
+ */
65
+ declare public readonly disabled: pulumi.Output<boolean>;
66
+ /**
67
+ * Domain patterns (default: any)
68
+ */
69
+ declare public readonly domains: pulumi.Output<string[]>;
70
+ /**
71
+ * IP filter type (ip_is, ip_is_not, any)
72
+ */
73
+ declare public readonly ip: pulumi.Output<string>;
74
+ /**
75
+ * Allowed IP addresses
76
+ */
77
+ declare public readonly ipIs: pulumi.Output<string[]>;
78
+ /**
79
+ * Excluded IP addresses
80
+ */
81
+ declare public readonly ipIsNots: pulumi.Output<string[]>;
82
+ /**
83
+ * Method filter type (method_is, method_is_not, any)
84
+ */
85
+ declare public readonly method: pulumi.Output<string>;
86
+ /**
87
+ * Allowed HTTP methods
88
+ */
89
+ declare public readonly methodIs: pulumi.Output<string[]>;
90
+ /**
91
+ * Excluded HTTP methods
92
+ */
93
+ declare public readonly methodIsNots: pulumi.Output<string[]>;
94
+ /**
95
+ * Rule name
96
+ */
97
+ declare public readonly name: pulumi.Output<string>;
98
+ /**
99
+ * Only apply with cookie
100
+ */
101
+ declare public /*out*/ readonly onlyWithCookie: pulumi.Output<string>;
102
+ /**
103
+ * Organization identifier
104
+ */
105
+ declare public readonly organization: pulumi.Output<string>;
106
+ /**
107
+ * Project identifier
108
+ */
109
+ declare public readonly project: pulumi.Output<string>;
110
+ /**
111
+ * Rule identifier
112
+ */
113
+ declare public readonly rule: pulumi.Output<string>;
114
+ /**
115
+ * Rule ID
116
+ */
117
+ declare public /*out*/ readonly ruleId: pulumi.Output<string>;
118
+ /**
119
+ * URL patterns
120
+ */
121
+ declare public readonly urls: pulumi.Output<string[]>;
122
+ /**
123
+ * Rule UUID
124
+ */
125
+ declare public readonly uuid: pulumi.Output<string>;
126
+ /**
127
+ * Rule weight
128
+ */
129
+ declare public readonly weight: pulumi.Output<number>;
130
+
131
+ /**
132
+ * Create a RuleAuth resource with the given unique name, arguments, and options.
133
+ *
134
+ * @param name The _unique_ name of the resource.
135
+ * @param args The arguments to use to populate this resource's properties.
136
+ * @param opts A bag of options that control this resource's behavior.
137
+ */
138
+ constructor(name: string, args: RuleAuthArgs, opts?: pulumi.CustomResourceOptions)
139
+ constructor(name: string, argsOrState?: RuleAuthArgs | RuleAuthState, opts?: pulumi.CustomResourceOptions) {
140
+ let resourceInputs: pulumi.Inputs = {};
141
+ opts = opts || {};
142
+ if (opts.id) {
143
+ const state = argsOrState as RuleAuthState | undefined;
144
+ resourceInputs["action"] = state?.action;
145
+ resourceInputs["actionConfig"] = state?.actionConfig;
146
+ resourceInputs["authPass"] = state?.authPass;
147
+ resourceInputs["authUser"] = state?.authUser;
148
+ resourceInputs["country"] = state?.country;
149
+ resourceInputs["countryIs"] = state?.countryIs;
150
+ resourceInputs["countryIsNots"] = state?.countryIsNots;
151
+ resourceInputs["disabled"] = state?.disabled;
152
+ resourceInputs["domains"] = state?.domains;
153
+ resourceInputs["ip"] = state?.ip;
154
+ resourceInputs["ipIs"] = state?.ipIs;
155
+ resourceInputs["ipIsNots"] = state?.ipIsNots;
156
+ resourceInputs["method"] = state?.method;
157
+ resourceInputs["methodIs"] = state?.methodIs;
158
+ resourceInputs["methodIsNots"] = state?.methodIsNots;
159
+ resourceInputs["name"] = state?.name;
160
+ resourceInputs["onlyWithCookie"] = state?.onlyWithCookie;
161
+ resourceInputs["organization"] = state?.organization;
162
+ resourceInputs["project"] = state?.project;
163
+ resourceInputs["rule"] = state?.rule;
164
+ resourceInputs["ruleId"] = state?.ruleId;
165
+ resourceInputs["urls"] = state?.urls;
166
+ resourceInputs["uuid"] = state?.uuid;
167
+ resourceInputs["weight"] = state?.weight;
168
+ } else {
169
+ const args = argsOrState as RuleAuthArgs | undefined;
170
+ if (args?.authPass === undefined && !opts.urn) {
171
+ throw new Error("Missing required property 'authPass'");
172
+ }
173
+ if (args?.authUser === undefined && !opts.urn) {
174
+ throw new Error("Missing required property 'authUser'");
175
+ }
176
+ if (args?.domains === undefined && !opts.urn) {
177
+ throw new Error("Missing required property 'domains'");
178
+ }
179
+ if (args?.urls === undefined && !opts.urn) {
180
+ throw new Error("Missing required property 'urls'");
181
+ }
182
+ resourceInputs["authPass"] = args?.authPass ? pulumi.secret(args.authPass) : undefined;
183
+ resourceInputs["authUser"] = args?.authUser;
184
+ resourceInputs["country"] = args?.country;
185
+ resourceInputs["countryIs"] = args?.countryIs;
186
+ resourceInputs["countryIsNots"] = args?.countryIsNots;
187
+ resourceInputs["disabled"] = args?.disabled;
188
+ resourceInputs["domains"] = args?.domains;
189
+ resourceInputs["ip"] = args?.ip;
190
+ resourceInputs["ipIs"] = args?.ipIs;
191
+ resourceInputs["ipIsNots"] = args?.ipIsNots;
192
+ resourceInputs["method"] = args?.method;
193
+ resourceInputs["methodIs"] = args?.methodIs;
194
+ resourceInputs["methodIsNots"] = args?.methodIsNots;
195
+ resourceInputs["name"] = args?.name;
196
+ resourceInputs["organization"] = args?.organization;
197
+ resourceInputs["project"] = args?.project;
198
+ resourceInputs["rule"] = args?.rule;
199
+ resourceInputs["urls"] = args?.urls;
200
+ resourceInputs["uuid"] = args?.uuid;
201
+ resourceInputs["weight"] = args?.weight;
202
+ resourceInputs["action"] = undefined /*out*/;
203
+ resourceInputs["actionConfig"] = undefined /*out*/;
204
+ resourceInputs["onlyWithCookie"] = undefined /*out*/;
205
+ resourceInputs["ruleId"] = undefined /*out*/;
206
+ }
207
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
208
+ const secretOpts = { additionalSecretOutputs: ["authPass"] };
209
+ opts = pulumi.mergeOptions(opts, secretOpts);
210
+ super(RuleAuth.__pulumiType, name, resourceInputs, opts);
211
+ }
212
+ }
213
+
214
+ /**
215
+ * Input properties used for looking up and filtering RuleAuth resources.
216
+ */
217
+ export interface RuleAuthState {
218
+ /**
219
+ * Rule action
220
+ */
221
+ action?: pulumi.Input<string>;
222
+ actionConfig?: pulumi.Input<inputs.RuleAuthActionConfig>;
223
+ /**
224
+ * Authentication password
225
+ */
226
+ authPass?: pulumi.Input<string>;
227
+ /**
228
+ * Authentication username
229
+ */
230
+ authUser?: pulumi.Input<string>;
231
+ /**
232
+ * Country filter type (country_is, country_is_not, any)
233
+ */
234
+ country?: pulumi.Input<string>;
235
+ /**
236
+ * Allowed countries
237
+ */
238
+ countryIs?: pulumi.Input<pulumi.Input<string>[]>;
239
+ /**
240
+ * Excluded countries
241
+ */
242
+ countryIsNots?: pulumi.Input<pulumi.Input<string>[]>;
243
+ /**
244
+ * Whether rule is disabled
245
+ */
246
+ disabled?: pulumi.Input<boolean>;
247
+ /**
248
+ * Domain patterns (default: any)
249
+ */
250
+ domains?: pulumi.Input<pulumi.Input<string>[]>;
251
+ /**
252
+ * IP filter type (ip_is, ip_is_not, any)
253
+ */
254
+ ip?: pulumi.Input<string>;
255
+ /**
256
+ * Allowed IP addresses
257
+ */
258
+ ipIs?: pulumi.Input<pulumi.Input<string>[]>;
259
+ /**
260
+ * Excluded IP addresses
261
+ */
262
+ ipIsNots?: pulumi.Input<pulumi.Input<string>[]>;
263
+ /**
264
+ * Method filter type (method_is, method_is_not, any)
265
+ */
266
+ method?: pulumi.Input<string>;
267
+ /**
268
+ * Allowed HTTP methods
269
+ */
270
+ methodIs?: pulumi.Input<pulumi.Input<string>[]>;
271
+ /**
272
+ * Excluded HTTP methods
273
+ */
274
+ methodIsNots?: pulumi.Input<pulumi.Input<string>[]>;
275
+ /**
276
+ * Rule name
277
+ */
278
+ name?: pulumi.Input<string>;
279
+ /**
280
+ * Only apply with cookie
281
+ */
282
+ onlyWithCookie?: pulumi.Input<string>;
283
+ /**
284
+ * Organization identifier
285
+ */
286
+ organization?: pulumi.Input<string>;
287
+ /**
288
+ * Project identifier
289
+ */
290
+ project?: pulumi.Input<string>;
291
+ /**
292
+ * Rule identifier
293
+ */
294
+ rule?: pulumi.Input<string>;
295
+ /**
296
+ * Rule ID
297
+ */
298
+ ruleId?: pulumi.Input<string>;
299
+ /**
300
+ * URL patterns
301
+ */
302
+ urls?: pulumi.Input<pulumi.Input<string>[]>;
303
+ /**
304
+ * Rule UUID
305
+ */
306
+ uuid?: pulumi.Input<string>;
307
+ /**
308
+ * Rule weight
309
+ */
310
+ weight?: pulumi.Input<number>;
311
+ }
312
+
313
+ /**
314
+ * The set of arguments for constructing a RuleAuth resource.
315
+ */
316
+ export interface RuleAuthArgs {
317
+ /**
318
+ * Authentication password
319
+ */
320
+ authPass: pulumi.Input<string>;
321
+ /**
322
+ * Authentication username
323
+ */
324
+ authUser: pulumi.Input<string>;
325
+ /**
326
+ * Country filter type (country_is, country_is_not, any)
327
+ */
328
+ country?: pulumi.Input<string>;
329
+ /**
330
+ * Allowed countries
331
+ */
332
+ countryIs?: pulumi.Input<pulumi.Input<string>[]>;
333
+ /**
334
+ * Excluded countries
335
+ */
336
+ countryIsNots?: pulumi.Input<pulumi.Input<string>[]>;
337
+ /**
338
+ * Whether rule is disabled
339
+ */
340
+ disabled?: pulumi.Input<boolean>;
341
+ /**
342
+ * Domain patterns (default: any)
343
+ */
344
+ domains: pulumi.Input<pulumi.Input<string>[]>;
345
+ /**
346
+ * IP filter type (ip_is, ip_is_not, any)
347
+ */
348
+ ip?: pulumi.Input<string>;
349
+ /**
350
+ * Allowed IP addresses
351
+ */
352
+ ipIs?: pulumi.Input<pulumi.Input<string>[]>;
353
+ /**
354
+ * Excluded IP addresses
355
+ */
356
+ ipIsNots?: pulumi.Input<pulumi.Input<string>[]>;
357
+ /**
358
+ * Method filter type (method_is, method_is_not, any)
359
+ */
360
+ method?: pulumi.Input<string>;
361
+ /**
362
+ * Allowed HTTP methods
363
+ */
364
+ methodIs?: pulumi.Input<pulumi.Input<string>[]>;
365
+ /**
366
+ * Excluded HTTP methods
367
+ */
368
+ methodIsNots?: pulumi.Input<pulumi.Input<string>[]>;
369
+ /**
370
+ * Rule name
371
+ */
372
+ name?: pulumi.Input<string>;
373
+ /**
374
+ * Organization identifier
375
+ */
376
+ organization?: pulumi.Input<string>;
377
+ /**
378
+ * Project identifier
379
+ */
380
+ project?: pulumi.Input<string>;
381
+ /**
382
+ * Rule identifier
383
+ */
384
+ rule?: pulumi.Input<string>;
385
+ /**
386
+ * URL patterns
387
+ */
388
+ urls: pulumi.Input<pulumi.Input<string>[]>;
389
+ /**
390
+ * Rule UUID
391
+ */
392
+ uuid?: pulumi.Input<string>;
393
+ /**
394
+ * Rule weight
395
+ */
396
+ weight?: pulumi.Input<number>;
397
+ }