@pulumi/aws 7.6.0-alpha.1755718609 → 7.6.0-alpha.1756157700

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/wafv2/webAcl.d.ts CHANGED
@@ -1,6 +1,423 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "../types/input";
3
3
  import * as outputs from "../types/output";
4
+ /**
5
+ * Creates a WAFv2 Web ACL resource.
6
+ *
7
+ * > **Note** In `fieldToMatch` blocks, _e.g._, in `byteMatchStatement`, the `body` block includes an optional argument `oversizeHandling`. AWS indicates this argument will be required starting February 2023. To avoid configurations breaking when that change happens, treat the `oversizeHandling` argument as **required** as soon as possible.
8
+ *
9
+ * !> **Warning:** If you use the `aws.wafv2.WebAclRuleGroupAssociation` resource to associate rule groups with this Web ACL, you must add `lifecycle { ignoreChanges = [rule] }` to this resource to prevent configuration drift. The association resource modifies the Web ACL's rules outside of this resource's direct management.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * This resource is based on `aws.wafv2.RuleGroup`, check the documentation of the `aws.wafv2.RuleGroup` resource to see examples of the various available statements.
14
+ *
15
+ * ### Managed Rule
16
+ *
17
+ * ```typescript
18
+ * import * as pulumi from "@pulumi/pulumi";
19
+ * import * as aws from "@pulumi/aws";
20
+ *
21
+ * const example = new aws.wafv2.WebAcl("example", {
22
+ * name: "managed-rule-example",
23
+ * description: "Example of a managed rule.",
24
+ * scope: "REGIONAL",
25
+ * defaultAction: {
26
+ * allow: {},
27
+ * },
28
+ * rules: [{
29
+ * name: "rule-1",
30
+ * priority: 1,
31
+ * overrideAction: {
32
+ * count: {},
33
+ * },
34
+ * statement: {
35
+ * managedRuleGroupStatement: {
36
+ * name: "AWSManagedRulesCommonRuleSet",
37
+ * vendorName: "AWS",
38
+ * ruleActionOverrides: [
39
+ * {
40
+ * actionToUse: {
41
+ * count: {},
42
+ * },
43
+ * name: "SizeRestrictions_QUERYSTRING",
44
+ * },
45
+ * {
46
+ * actionToUse: {
47
+ * count: {},
48
+ * },
49
+ * name: "NoUserAgent_HEADER",
50
+ * },
51
+ * ],
52
+ * scopeDownStatement: {
53
+ * geoMatchStatement: {
54
+ * countryCodes: [
55
+ * "US",
56
+ * "NL",
57
+ * ],
58
+ * },
59
+ * },
60
+ * },
61
+ * },
62
+ * visibilityConfig: {
63
+ * cloudwatchMetricsEnabled: false,
64
+ * metricName: "friendly-rule-metric-name",
65
+ * sampledRequestsEnabled: false,
66
+ * },
67
+ * }],
68
+ * tags: {
69
+ * Tag1: "Value1",
70
+ * Tag2: "Value2",
71
+ * },
72
+ * tokenDomains: [
73
+ * "mywebsite.com",
74
+ * "myotherwebsite.com",
75
+ * ],
76
+ * visibilityConfig: {
77
+ * cloudwatchMetricsEnabled: false,
78
+ * metricName: "friendly-metric-name",
79
+ * sampledRequestsEnabled: false,
80
+ * },
81
+ * });
82
+ * ```
83
+ *
84
+ * ### Account Creation Fraud Prevention
85
+ *
86
+ * ```typescript
87
+ * import * as pulumi from "@pulumi/pulumi";
88
+ * import * as aws from "@pulumi/aws";
89
+ *
90
+ * const acfp_example = new aws.wafv2.WebAcl("acfp-example", {
91
+ * name: "managed-acfp-example",
92
+ * description: "Example of a managed ACFP rule.",
93
+ * scope: "CLOUDFRONT",
94
+ * defaultAction: {
95
+ * allow: {},
96
+ * },
97
+ * rules: [{
98
+ * name: "acfp-rule-1",
99
+ * priority: 1,
100
+ * overrideAction: {
101
+ * count: {},
102
+ * },
103
+ * statement: {
104
+ * managedRuleGroupStatement: {
105
+ * name: "AWSManagedRulesACFPRuleSet",
106
+ * vendorName: "AWS",
107
+ * managedRuleGroupConfigs: [{
108
+ * awsManagedRulesAcfpRuleSet: {
109
+ * creationPath: "/signin",
110
+ * registrationPagePath: "/register",
111
+ * requestInspection: {
112
+ * emailField: {
113
+ * identifier: "/email",
114
+ * },
115
+ * passwordField: {
116
+ * identifier: "/password",
117
+ * },
118
+ * payloadType: "JSON",
119
+ * usernameField: {
120
+ * identifier: "/username",
121
+ * },
122
+ * },
123
+ * responseInspection: {
124
+ * statusCode: {
125
+ * failureCodes: [403],
126
+ * successCodes: [200],
127
+ * },
128
+ * },
129
+ * },
130
+ * }],
131
+ * },
132
+ * },
133
+ * visibilityConfig: {
134
+ * cloudwatchMetricsEnabled: false,
135
+ * metricName: "friendly-rule-metric-name",
136
+ * sampledRequestsEnabled: false,
137
+ * },
138
+ * }],
139
+ * visibilityConfig: {
140
+ * cloudwatchMetricsEnabled: false,
141
+ * metricName: "friendly-metric-name",
142
+ * sampledRequestsEnabled: false,
143
+ * },
144
+ * });
145
+ * ```
146
+ *
147
+ * ### Account Takeover Protection
148
+ *
149
+ * ```typescript
150
+ * import * as pulumi from "@pulumi/pulumi";
151
+ * import * as aws from "@pulumi/aws";
152
+ *
153
+ * const atp_example = new aws.wafv2.WebAcl("atp-example", {
154
+ * name: "managed-atp-example",
155
+ * description: "Example of a managed ATP rule.",
156
+ * scope: "CLOUDFRONT",
157
+ * defaultAction: {
158
+ * allow: {},
159
+ * },
160
+ * rules: [{
161
+ * name: "atp-rule-1",
162
+ * priority: 1,
163
+ * overrideAction: {
164
+ * count: {},
165
+ * },
166
+ * statement: {
167
+ * managedRuleGroupStatement: {
168
+ * name: "AWSManagedRulesATPRuleSet",
169
+ * vendorName: "AWS",
170
+ * managedRuleGroupConfigs: [{
171
+ * awsManagedRulesAtpRuleSet: {
172
+ * loginPath: "/api/1/signin",
173
+ * requestInspection: {
174
+ * passwordField: {
175
+ * identifier: "/password",
176
+ * },
177
+ * payloadType: "JSON",
178
+ * usernameField: {
179
+ * identifier: "/email",
180
+ * },
181
+ * },
182
+ * responseInspection: {
183
+ * statusCode: {
184
+ * failureCodes: [403],
185
+ * successCodes: [200],
186
+ * },
187
+ * },
188
+ * },
189
+ * }],
190
+ * },
191
+ * },
192
+ * visibilityConfig: {
193
+ * cloudwatchMetricsEnabled: false,
194
+ * metricName: "friendly-rule-metric-name",
195
+ * sampledRequestsEnabled: false,
196
+ * },
197
+ * }],
198
+ * visibilityConfig: {
199
+ * cloudwatchMetricsEnabled: false,
200
+ * metricName: "friendly-metric-name",
201
+ * sampledRequestsEnabled: false,
202
+ * },
203
+ * });
204
+ * ```
205
+ *
206
+ * ### Rate Based
207
+ *
208
+ * Rate-limit US and NL-based clients to 10,000 requests for every 5 minutes.
209
+ *
210
+ * ```typescript
211
+ * import * as pulumi from "@pulumi/pulumi";
212
+ * import * as aws from "@pulumi/aws";
213
+ *
214
+ * const example = new aws.wafv2.WebAcl("example", {
215
+ * name: "rate-based-example",
216
+ * description: "Example of a Cloudfront rate based statement.",
217
+ * scope: "CLOUDFRONT",
218
+ * defaultAction: {
219
+ * allow: {},
220
+ * },
221
+ * rules: [{
222
+ * name: "rule-1",
223
+ * priority: 1,
224
+ * action: {
225
+ * block: {},
226
+ * },
227
+ * statement: {
228
+ * rateBasedStatement: {
229
+ * limit: 10000,
230
+ * aggregateKeyType: "IP",
231
+ * scopeDownStatement: {
232
+ * geoMatchStatement: {
233
+ * countryCodes: [
234
+ * "US",
235
+ * "NL",
236
+ * ],
237
+ * },
238
+ * },
239
+ * },
240
+ * },
241
+ * visibilityConfig: {
242
+ * cloudwatchMetricsEnabled: false,
243
+ * metricName: "friendly-rule-metric-name",
244
+ * sampledRequestsEnabled: false,
245
+ * },
246
+ * }],
247
+ * tags: {
248
+ * Tag1: "Value1",
249
+ * Tag2: "Value2",
250
+ * },
251
+ * visibilityConfig: {
252
+ * cloudwatchMetricsEnabled: false,
253
+ * metricName: "friendly-metric-name",
254
+ * sampledRequestsEnabled: false,
255
+ * },
256
+ * });
257
+ * ```
258
+ *
259
+ * ### Rule Group Reference
260
+ *
261
+ * ```typescript
262
+ * import * as pulumi from "@pulumi/pulumi";
263
+ * import * as aws from "@pulumi/aws";
264
+ *
265
+ * const example = new aws.wafv2.RuleGroup("example", {
266
+ * capacity: 10,
267
+ * name: "example-rule-group",
268
+ * scope: "REGIONAL",
269
+ * rules: [
270
+ * {
271
+ * name: "rule-1",
272
+ * priority: 1,
273
+ * action: {
274
+ * count: {},
275
+ * },
276
+ * statement: {
277
+ * geoMatchStatement: {
278
+ * countryCodes: ["NL"],
279
+ * },
280
+ * },
281
+ * visibilityConfig: {
282
+ * cloudwatchMetricsEnabled: false,
283
+ * metricName: "friendly-rule-metric-name",
284
+ * sampledRequestsEnabled: false,
285
+ * },
286
+ * },
287
+ * {
288
+ * name: "rule-to-exclude-a",
289
+ * priority: 10,
290
+ * action: {
291
+ * allow: {},
292
+ * },
293
+ * statement: {
294
+ * geoMatchStatement: {
295
+ * countryCodes: ["US"],
296
+ * },
297
+ * },
298
+ * visibilityConfig: {
299
+ * cloudwatchMetricsEnabled: false,
300
+ * metricName: "friendly-rule-metric-name",
301
+ * sampledRequestsEnabled: false,
302
+ * },
303
+ * },
304
+ * {
305
+ * name: "rule-to-exclude-b",
306
+ * priority: 15,
307
+ * action: {
308
+ * allow: {},
309
+ * },
310
+ * statement: {
311
+ * geoMatchStatement: {
312
+ * countryCodes: ["GB"],
313
+ * },
314
+ * },
315
+ * visibilityConfig: {
316
+ * cloudwatchMetricsEnabled: false,
317
+ * metricName: "friendly-rule-metric-name",
318
+ * sampledRequestsEnabled: false,
319
+ * },
320
+ * },
321
+ * ],
322
+ * visibilityConfig: {
323
+ * cloudwatchMetricsEnabled: false,
324
+ * metricName: "friendly-metric-name",
325
+ * sampledRequestsEnabled: false,
326
+ * },
327
+ * });
328
+ * const test = new aws.wafv2.WebAcl("test", {
329
+ * name: "rule-group-example",
330
+ * scope: "REGIONAL",
331
+ * defaultAction: {
332
+ * block: {},
333
+ * },
334
+ * rules: [{
335
+ * name: "rule-1",
336
+ * priority: 1,
337
+ * overrideAction: {
338
+ * count: {},
339
+ * },
340
+ * statement: {
341
+ * ruleGroupReferenceStatement: {
342
+ * arn: example.arn,
343
+ * ruleActionOverrides: [
344
+ * {
345
+ * actionToUse: {
346
+ * count: {},
347
+ * },
348
+ * name: "rule-to-exclude-b",
349
+ * },
350
+ * {
351
+ * actionToUse: {
352
+ * count: {},
353
+ * },
354
+ * name: "rule-to-exclude-a",
355
+ * },
356
+ * ],
357
+ * },
358
+ * },
359
+ * visibilityConfig: {
360
+ * cloudwatchMetricsEnabled: false,
361
+ * metricName: "friendly-rule-metric-name",
362
+ * sampledRequestsEnabled: false,
363
+ * },
364
+ * }],
365
+ * tags: {
366
+ * Tag1: "Value1",
367
+ * Tag2: "Value2",
368
+ * },
369
+ * visibilityConfig: {
370
+ * cloudwatchMetricsEnabled: false,
371
+ * metricName: "friendly-metric-name",
372
+ * sampledRequestsEnabled: false,
373
+ * },
374
+ * });
375
+ * ```
376
+ *
377
+ * ### Large Request Body Inspections for Regional Resources
378
+ *
379
+ * ```typescript
380
+ * import * as pulumi from "@pulumi/pulumi";
381
+ * import * as aws from "@pulumi/aws";
382
+ *
383
+ * const example = new aws.wafv2.WebAcl("example", {
384
+ * name: "large-request-body-example",
385
+ * scope: "REGIONAL",
386
+ * defaultAction: {
387
+ * allow: {},
388
+ * },
389
+ * associationConfig: {
390
+ * requestBodies: [{
391
+ * apiGateway: {
392
+ * defaultSizeInspectionLimit: "KB_64",
393
+ * },
394
+ * appRunnerService: {
395
+ * defaultSizeInspectionLimit: "KB_64",
396
+ * },
397
+ * cognitoUserPool: {
398
+ * defaultSizeInspectionLimit: "KB_64",
399
+ * },
400
+ * verifiedAccessInstance: {
401
+ * defaultSizeInspectionLimit: "KB_64",
402
+ * },
403
+ * }],
404
+ * },
405
+ * visibilityConfig: {
406
+ * cloudwatchMetricsEnabled: false,
407
+ * metricName: "friendly-metric-name",
408
+ * sampledRequestsEnabled: false,
409
+ * },
410
+ * });
411
+ * ```
412
+ *
413
+ * ## Import
414
+ *
415
+ * Using `pulumi import`, import WAFv2 Web ACLs using `ID/Name/Scope`. For example:
416
+ *
417
+ * ```sh
418
+ * $ pulumi import aws:wafv2/webAcl:WebAcl example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc/example/REGIONAL
419
+ * ```
420
+ */
4
421
  export declare class WebAcl extends pulumi.CustomResource {
5
422
  /**
6
423
  * Get an existing WebAcl resource's state with the given name, ID, and optional extra