/sdk/dotnet/WafV2/RuleGroup.cs

https://github.com/pulumi/pulumi-aws · C# · 621 lines · 132 code · 41 blank · 448 comment · 0 complexity · 116d64a44c7ab79cf9d15d47e1e53e31 MD5 · raw file

  1. // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
  2. // *** Do not edit by hand unless you're certain you know what you are doing! ***
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Collections.Immutable;
  6. using System.Threading.Tasks;
  7. using Pulumi.Serialization;
  8. namespace Pulumi.Aws.WafV2
  9. {
  10. /// <summary>
  11. /// Creates a WAFv2 Rule Group resource.
  12. ///
  13. /// ## Example Usage
  14. /// ### Simple
  15. ///
  16. /// ```csharp
  17. /// using Pulumi;
  18. /// using Aws = Pulumi.Aws;
  19. ///
  20. /// class MyStack : Stack
  21. /// {
  22. /// public MyStack()
  23. /// {
  24. /// var example = new Aws.WafV2.RuleGroup("example", new Aws.WafV2.RuleGroupArgs
  25. /// {
  26. /// Capacity = 2,
  27. /// Rules =
  28. /// {
  29. /// new Aws.WafV2.Inputs.RuleGroupRuleArgs
  30. /// {
  31. /// Action = new Aws.WafV2.Inputs.RuleGroupRuleActionArgs
  32. /// {
  33. /// Allow = ,
  34. /// },
  35. /// Name = "rule-1",
  36. /// Priority = 1,
  37. /// Statement = new Aws.WafV2.Inputs.RuleGroupRuleStatementArgs
  38. /// {
  39. /// GeoMatchStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementGeoMatchStatementArgs
  40. /// {
  41. /// CountryCodes =
  42. /// {
  43. /// "US",
  44. /// "NL",
  45. /// },
  46. /// },
  47. /// },
  48. /// VisibilityConfig = new Aws.WafV2.Inputs.RuleGroupRuleVisibilityConfigArgs
  49. /// {
  50. /// CloudwatchMetricsEnabled = false,
  51. /// MetricName = "friendly-rule-metric-name",
  52. /// SampledRequestsEnabled = false,
  53. /// },
  54. /// },
  55. /// },
  56. /// Scope = "REGIONAL",
  57. /// VisibilityConfig = new Aws.WafV2.Inputs.RuleGroupVisibilityConfigArgs
  58. /// {
  59. /// CloudwatchMetricsEnabled = false,
  60. /// MetricName = "friendly-metric-name",
  61. /// SampledRequestsEnabled = false,
  62. /// },
  63. /// });
  64. /// }
  65. ///
  66. /// }
  67. /// ```
  68. /// ### Complex
  69. ///
  70. /// ```csharp
  71. /// using Pulumi;
  72. /// using Aws = Pulumi.Aws;
  73. ///
  74. /// class MyStack : Stack
  75. /// {
  76. /// public MyStack()
  77. /// {
  78. /// var testIpSet = new Aws.WafV2.IpSet("testIpSet", new Aws.WafV2.IpSetArgs
  79. /// {
  80. /// Scope = "REGIONAL",
  81. /// IpAddressVersion = "IPV4",
  82. /// Addresses =
  83. /// {
  84. /// "1.1.1.1/32",
  85. /// "2.2.2.2/32",
  86. /// },
  87. /// });
  88. /// var testRegexPatternSet = new Aws.WafV2.RegexPatternSet("testRegexPatternSet", new Aws.WafV2.RegexPatternSetArgs
  89. /// {
  90. /// Scope = "REGIONAL",
  91. /// RegularExpressions =
  92. /// {
  93. /// new Aws.WafV2.Inputs.RegexPatternSetRegularExpressionArgs
  94. /// {
  95. /// RegexString = "one",
  96. /// },
  97. /// },
  98. /// });
  99. /// var example = new Aws.WafV2.RuleGroup("example", new Aws.WafV2.RuleGroupArgs
  100. /// {
  101. /// Description = "An rule group containing all statements",
  102. /// Scope = "REGIONAL",
  103. /// Capacity = 500,
  104. /// Rules =
  105. /// {
  106. /// new Aws.WafV2.Inputs.RuleGroupRuleArgs
  107. /// {
  108. /// Name = "rule-1",
  109. /// Priority = 1,
  110. /// Action = new Aws.WafV2.Inputs.RuleGroupRuleActionArgs
  111. /// {
  112. /// Block = ,
  113. /// },
  114. /// Statement = new Aws.WafV2.Inputs.RuleGroupRuleStatementArgs
  115. /// {
  116. /// NotStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementArgs
  117. /// {
  118. /// Statements =
  119. /// {
  120. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementArgs
  121. /// {
  122. /// AndStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementAndStatementArgs
  123. /// {
  124. /// Statements =
  125. /// {
  126. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementAndStatementStatementArgs
  127. /// {
  128. /// GeoMatchStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementAndStatementStatementGeoMatchStatementArgs
  129. /// {
  130. /// CountryCodes =
  131. /// {
  132. /// "US",
  133. /// },
  134. /// },
  135. /// },
  136. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementAndStatementStatementArgs
  137. /// {
  138. /// ByteMatchStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementAndStatementStatementByteMatchStatementArgs
  139. /// {
  140. /// PositionalConstraint = "CONTAINS",
  141. /// SearchString = "word",
  142. /// FieldToMatch = new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementAndStatementStatementByteMatchStatementFieldToMatchArgs
  143. /// {
  144. /// AllQueryArguments = ,
  145. /// },
  146. /// TextTransformations =
  147. /// {
  148. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementAndStatementStatementByteMatchStatementTextTransformationArgs
  149. /// {
  150. /// Priority = 5,
  151. /// Type = "CMD_LINE",
  152. /// },
  153. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementNotStatementStatementAndStatementStatementByteMatchStatementTextTransformationArgs
  154. /// {
  155. /// Priority = 2,
  156. /// Type = "LOWERCASE",
  157. /// },
  158. /// },
  159. /// },
  160. /// },
  161. /// },
  162. /// },
  163. /// },
  164. /// },
  165. /// },
  166. /// },
  167. /// VisibilityConfig = new Aws.WafV2.Inputs.RuleGroupRuleVisibilityConfigArgs
  168. /// {
  169. /// CloudwatchMetricsEnabled = false,
  170. /// MetricName = "rule-1",
  171. /// SampledRequestsEnabled = false,
  172. /// },
  173. /// },
  174. /// new Aws.WafV2.Inputs.RuleGroupRuleArgs
  175. /// {
  176. /// Name = "rule-2",
  177. /// Priority = 2,
  178. /// Action = new Aws.WafV2.Inputs.RuleGroupRuleActionArgs
  179. /// {
  180. /// Count = ,
  181. /// },
  182. /// Statement = new Aws.WafV2.Inputs.RuleGroupRuleStatementArgs
  183. /// {
  184. /// OrStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementArgs
  185. /// {
  186. /// Statements =
  187. /// {
  188. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementArgs
  189. /// {
  190. /// SqliMatchStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementSqliMatchStatementArgs
  191. /// {
  192. /// FieldToMatch = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementSqliMatchStatementFieldToMatchArgs
  193. /// {
  194. /// Body = ,
  195. /// },
  196. /// TextTransformations =
  197. /// {
  198. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementSqliMatchStatementTextTransformationArgs
  199. /// {
  200. /// Priority = 5,
  201. /// Type = "URL_DECODE",
  202. /// },
  203. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementSqliMatchStatementTextTransformationArgs
  204. /// {
  205. /// Priority = 4,
  206. /// Type = "HTML_ENTITY_DECODE",
  207. /// },
  208. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementSqliMatchStatementTextTransformationArgs
  209. /// {
  210. /// Priority = 3,
  211. /// Type = "COMPRESS_WHITE_SPACE",
  212. /// },
  213. /// },
  214. /// },
  215. /// },
  216. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementArgs
  217. /// {
  218. /// XssMatchStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementXssMatchStatementArgs
  219. /// {
  220. /// FieldToMatch = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementXssMatchStatementFieldToMatchArgs
  221. /// {
  222. /// Method = ,
  223. /// },
  224. /// TextTransformations =
  225. /// {
  226. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementXssMatchStatementTextTransformationArgs
  227. /// {
  228. /// Priority = 2,
  229. /// Type = "NONE",
  230. /// },
  231. /// },
  232. /// },
  233. /// },
  234. /// },
  235. /// },
  236. /// },
  237. /// VisibilityConfig = new Aws.WafV2.Inputs.RuleGroupRuleVisibilityConfigArgs
  238. /// {
  239. /// CloudwatchMetricsEnabled = false,
  240. /// MetricName = "rule-2",
  241. /// SampledRequestsEnabled = false,
  242. /// },
  243. /// },
  244. /// new Aws.WafV2.Inputs.RuleGroupRuleArgs
  245. /// {
  246. /// Name = "rule-3",
  247. /// Priority = 3,
  248. /// Action = new Aws.WafV2.Inputs.RuleGroupRuleActionArgs
  249. /// {
  250. /// Block = ,
  251. /// },
  252. /// Statement = new Aws.WafV2.Inputs.RuleGroupRuleStatementArgs
  253. /// {
  254. /// SizeConstraintStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementSizeConstraintStatementArgs
  255. /// {
  256. /// ComparisonOperator = "GT",
  257. /// Size = 100,
  258. /// FieldToMatch = new Aws.WafV2.Inputs.RuleGroupRuleStatementSizeConstraintStatementFieldToMatchArgs
  259. /// {
  260. /// SingleQueryArgument = new Aws.WafV2.Inputs.RuleGroupRuleStatementSizeConstraintStatementFieldToMatchSingleQueryArgumentArgs
  261. /// {
  262. /// Name = "username",
  263. /// },
  264. /// },
  265. /// TextTransformations =
  266. /// {
  267. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementSizeConstraintStatementTextTransformationArgs
  268. /// {
  269. /// Priority = 5,
  270. /// Type = "NONE",
  271. /// },
  272. /// },
  273. /// },
  274. /// },
  275. /// VisibilityConfig = new Aws.WafV2.Inputs.RuleGroupRuleVisibilityConfigArgs
  276. /// {
  277. /// CloudwatchMetricsEnabled = false,
  278. /// MetricName = "rule-3",
  279. /// SampledRequestsEnabled = false,
  280. /// },
  281. /// },
  282. /// new Aws.WafV2.Inputs.RuleGroupRuleArgs
  283. /// {
  284. /// Name = "rule-4",
  285. /// Priority = 4,
  286. /// Action = new Aws.WafV2.Inputs.RuleGroupRuleActionArgs
  287. /// {
  288. /// Block = ,
  289. /// },
  290. /// Statement = new Aws.WafV2.Inputs.RuleGroupRuleStatementArgs
  291. /// {
  292. /// OrStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementArgs
  293. /// {
  294. /// Statements =
  295. /// {
  296. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementArgs
  297. /// {
  298. /// IpSetReferenceStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementIpSetReferenceStatementArgs
  299. /// {
  300. /// Arn = testIpSet.Arn,
  301. /// },
  302. /// },
  303. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementArgs
  304. /// {
  305. /// RegexPatternSetReferenceStatement = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementRegexPatternSetReferenceStatementArgs
  306. /// {
  307. /// Arn = testRegexPatternSet.Arn,
  308. /// FieldToMatch = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementRegexPatternSetReferenceStatementFieldToMatchArgs
  309. /// {
  310. /// SingleHeader = new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeaderArgs
  311. /// {
  312. /// Name = "referer",
  313. /// },
  314. /// },
  315. /// TextTransformations =
  316. /// {
  317. /// new Aws.WafV2.Inputs.RuleGroupRuleStatementOrStatementStatementRegexPatternSetReferenceStatementTextTransformationArgs
  318. /// {
  319. /// Priority = 2,
  320. /// Type = "NONE",
  321. /// },
  322. /// },
  323. /// },
  324. /// },
  325. /// },
  326. /// },
  327. /// },
  328. /// VisibilityConfig = new Aws.WafV2.Inputs.RuleGroupRuleVisibilityConfigArgs
  329. /// {
  330. /// CloudwatchMetricsEnabled = false,
  331. /// MetricName = "rule-4",
  332. /// SampledRequestsEnabled = false,
  333. /// },
  334. /// },
  335. /// },
  336. /// VisibilityConfig = new Aws.WafV2.Inputs.RuleGroupVisibilityConfigArgs
  337. /// {
  338. /// CloudwatchMetricsEnabled = false,
  339. /// MetricName = "friendly-metric-name",
  340. /// SampledRequestsEnabled = false,
  341. /// },
  342. /// Tags =
  343. /// {
  344. /// { "Name", "example-and-statement" },
  345. /// { "Code", "123456" },
  346. /// },
  347. /// });
  348. /// }
  349. ///
  350. /// }
  351. /// ```
  352. ///
  353. /// ## Import
  354. ///
  355. /// WAFv2 Rule Group can be imported using `ID/name/scope` e.g.
  356. ///
  357. /// ```sh
  358. /// $ pulumi import aws:wafv2/ruleGroup:RuleGroup example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc/example/REGIONAL
  359. /// ```
  360. /// </summary>
  361. [AwsResourceType("aws:wafv2/ruleGroup:RuleGroup")]
  362. public partial class RuleGroup : Pulumi.CustomResource
  363. {
  364. /// <summary>
  365. /// The Amazon Resource Name (ARN) of the IP Set that this statement references.
  366. /// </summary>
  367. [Output("arn")]
  368. public Output<string> Arn { get; private set; } = null!;
  369. /// <summary>
  370. /// The web ACL capacity units (WCUs) required for this rule group. See [here](https://docs.aws.amazon.com/waf/latest/APIReference/API_CreateRuleGroup.html#API_CreateRuleGroup_RequestSyntax) for general information and [here](https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statements-list.html) for capacity specific information.
  371. /// </summary>
  372. [Output("capacity")]
  373. public Output<int> Capacity { get; private set; } = null!;
  374. /// <summary>
  375. /// A friendly description of the rule group.
  376. /// </summary>
  377. [Output("description")]
  378. public Output<string?> Description { get; private set; } = null!;
  379. [Output("lockToken")]
  380. public Output<string> LockToken { get; private set; } = null!;
  381. /// <summary>
  382. /// The name of the custom header. For custom request header insertion, when AWS WAF inserts the header into the request, it prefixes this name `x-amzn-waf-`, to avoid confusion with the headers that are already in the request. For example, for the header name `sample`, AWS WAF inserts the header `x-amzn-waf-sample`.
  383. /// </summary>
  384. [Output("name")]
  385. public Output<string> Name { get; private set; } = null!;
  386. /// <summary>
  387. /// The rule blocks used to identify the web requests that you want to `allow`, `block`, or `count`. See Rules below for details.
  388. /// </summary>
  389. [Output("rules")]
  390. public Output<ImmutableArray<Outputs.RuleGroupRule>> Rules { get; private set; } = null!;
  391. /// <summary>
  392. /// Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. To work with CloudFront, you must also specify the region `us-east-1` (N. Virginia) on the AWS provider.
  393. /// </summary>
  394. [Output("scope")]
  395. public Output<string> Scope { get; private set; } = null!;
  396. /// <summary>
  397. /// An array of key:value pairs to associate with the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  398. /// </summary>
  399. [Output("tags")]
  400. public Output<ImmutableDictionary<string, string>?> Tags { get; private set; } = null!;
  401. /// <summary>
  402. /// A map of tags assigned to the resource, including those inherited from the provider .
  403. /// </summary>
  404. [Output("tagsAll")]
  405. public Output<ImmutableDictionary<string, string>> TagsAll { get; private set; } = null!;
  406. /// <summary>
  407. /// Defines and enables Amazon CloudWatch metrics and web request sample collection. See Visibility Configuration below for details.
  408. /// </summary>
  409. [Output("visibilityConfig")]
  410. public Output<Outputs.RuleGroupVisibilityConfig> VisibilityConfig { get; private set; } = null!;
  411. /// <summary>
  412. /// Create a RuleGroup resource with the given unique name, arguments, and options.
  413. /// </summary>
  414. ///
  415. /// <param name="name">The unique name of the resource</param>
  416. /// <param name="args">The arguments used to populate this resource's properties</param>
  417. /// <param name="options">A bag of options that control this resource's behavior</param>
  418. public RuleGroup(string name, RuleGroupArgs args, CustomResourceOptions? options = null)
  419. : base("aws:wafv2/ruleGroup:RuleGroup", name, args ?? new RuleGroupArgs(), MakeResourceOptions(options, ""))
  420. {
  421. }
  422. private RuleGroup(string name, Input<string> id, RuleGroupState? state = null, CustomResourceOptions? options = null)
  423. : base("aws:wafv2/ruleGroup:RuleGroup", name, state, MakeResourceOptions(options, id))
  424. {
  425. }
  426. private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
  427. {
  428. var defaultOptions = new CustomResourceOptions
  429. {
  430. Version = Utilities.Version,
  431. };
  432. var merged = CustomResourceOptions.Merge(defaultOptions, options);
  433. // Override the ID if one was specified for consistency with other language SDKs.
  434. merged.Id = id ?? merged.Id;
  435. return merged;
  436. }
  437. /// <summary>
  438. /// Get an existing RuleGroup resource's state with the given name, ID, and optional extra
  439. /// properties used to qualify the lookup.
  440. /// </summary>
  441. ///
  442. /// <param name="name">The unique name of the resulting resource.</param>
  443. /// <param name="id">The unique provider ID of the resource to lookup.</param>
  444. /// <param name="state">Any extra arguments used during the lookup.</param>
  445. /// <param name="options">A bag of options that control this resource's behavior</param>
  446. public static RuleGroup Get(string name, Input<string> id, RuleGroupState? state = null, CustomResourceOptions? options = null)
  447. {
  448. return new RuleGroup(name, id, state, options);
  449. }
  450. }
  451. public sealed class RuleGroupArgs : Pulumi.ResourceArgs
  452. {
  453. /// <summary>
  454. /// The web ACL capacity units (WCUs) required for this rule group. See [here](https://docs.aws.amazon.com/waf/latest/APIReference/API_CreateRuleGroup.html#API_CreateRuleGroup_RequestSyntax) for general information and [here](https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statements-list.html) for capacity specific information.
  455. /// </summary>
  456. [Input("capacity", required: true)]
  457. public Input<int> Capacity { get; set; } = null!;
  458. /// <summary>
  459. /// A friendly description of the rule group.
  460. /// </summary>
  461. [Input("description")]
  462. public Input<string>? Description { get; set; }
  463. /// <summary>
  464. /// The name of the custom header. For custom request header insertion, when AWS WAF inserts the header into the request, it prefixes this name `x-amzn-waf-`, to avoid confusion with the headers that are already in the request. For example, for the header name `sample`, AWS WAF inserts the header `x-amzn-waf-sample`.
  465. /// </summary>
  466. [Input("name")]
  467. public Input<string>? Name { get; set; }
  468. [Input("rules")]
  469. private InputList<Inputs.RuleGroupRuleArgs>? _rules;
  470. /// <summary>
  471. /// The rule blocks used to identify the web requests that you want to `allow`, `block`, or `count`. See Rules below for details.
  472. /// </summary>
  473. public InputList<Inputs.RuleGroupRuleArgs> Rules
  474. {
  475. get => _rules ?? (_rules = new InputList<Inputs.RuleGroupRuleArgs>());
  476. set => _rules = value;
  477. }
  478. /// <summary>
  479. /// Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. To work with CloudFront, you must also specify the region `us-east-1` (N. Virginia) on the AWS provider.
  480. /// </summary>
  481. [Input("scope", required: true)]
  482. public Input<string> Scope { get; set; } = null!;
  483. [Input("tags")]
  484. private InputMap<string>? _tags;
  485. /// <summary>
  486. /// An array of key:value pairs to associate with the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  487. /// </summary>
  488. public InputMap<string> Tags
  489. {
  490. get => _tags ?? (_tags = new InputMap<string>());
  491. set => _tags = value;
  492. }
  493. [Input("tagsAll")]
  494. private InputMap<string>? _tagsAll;
  495. /// <summary>
  496. /// A map of tags assigned to the resource, including those inherited from the provider .
  497. /// </summary>
  498. public InputMap<string> TagsAll
  499. {
  500. get => _tagsAll ?? (_tagsAll = new InputMap<string>());
  501. set => _tagsAll = value;
  502. }
  503. /// <summary>
  504. /// Defines and enables Amazon CloudWatch metrics and web request sample collection. See Visibility Configuration below for details.
  505. /// </summary>
  506. [Input("visibilityConfig", required: true)]
  507. public Input<Inputs.RuleGroupVisibilityConfigArgs> VisibilityConfig { get; set; } = null!;
  508. public RuleGroupArgs()
  509. {
  510. }
  511. }
  512. public sealed class RuleGroupState : Pulumi.ResourceArgs
  513. {
  514. /// <summary>
  515. /// The Amazon Resource Name (ARN) of the IP Set that this statement references.
  516. /// </summary>
  517. [Input("arn")]
  518. public Input<string>? Arn { get; set; }
  519. /// <summary>
  520. /// The web ACL capacity units (WCUs) required for this rule group. See [here](https://docs.aws.amazon.com/waf/latest/APIReference/API_CreateRuleGroup.html#API_CreateRuleGroup_RequestSyntax) for general information and [here](https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statements-list.html) for capacity specific information.
  521. /// </summary>
  522. [Input("capacity")]
  523. public Input<int>? Capacity { get; set; }
  524. /// <summary>
  525. /// A friendly description of the rule group.
  526. /// </summary>
  527. [Input("description")]
  528. public Input<string>? Description { get; set; }
  529. [Input("lockToken")]
  530. public Input<string>? LockToken { get; set; }
  531. /// <summary>
  532. /// The name of the custom header. For custom request header insertion, when AWS WAF inserts the header into the request, it prefixes this name `x-amzn-waf-`, to avoid confusion with the headers that are already in the request. For example, for the header name `sample`, AWS WAF inserts the header `x-amzn-waf-sample`.
  533. /// </summary>
  534. [Input("name")]
  535. public Input<string>? Name { get; set; }
  536. [Input("rules")]
  537. private InputList<Inputs.RuleGroupRuleGetArgs>? _rules;
  538. /// <summary>
  539. /// The rule blocks used to identify the web requests that you want to `allow`, `block`, or `count`. See Rules below for details.
  540. /// </summary>
  541. public InputList<Inputs.RuleGroupRuleGetArgs> Rules
  542. {
  543. get => _rules ?? (_rules = new InputList<Inputs.RuleGroupRuleGetArgs>());
  544. set => _rules = value;
  545. }
  546. /// <summary>
  547. /// Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. To work with CloudFront, you must also specify the region `us-east-1` (N. Virginia) on the AWS provider.
  548. /// </summary>
  549. [Input("scope")]
  550. public Input<string>? Scope { get; set; }
  551. [Input("tags")]
  552. private InputMap<string>? _tags;
  553. /// <summary>
  554. /// An array of key:value pairs to associate with the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  555. /// </summary>
  556. public InputMap<string> Tags
  557. {
  558. get => _tags ?? (_tags = new InputMap<string>());
  559. set => _tags = value;
  560. }
  561. [Input("tagsAll")]
  562. private InputMap<string>? _tagsAll;
  563. /// <summary>
  564. /// A map of tags assigned to the resource, including those inherited from the provider .
  565. /// </summary>
  566. public InputMap<string> TagsAll
  567. {
  568. get => _tagsAll ?? (_tagsAll = new InputMap<string>());
  569. set => _tagsAll = value;
  570. }
  571. /// <summary>
  572. /// Defines and enables Amazon CloudWatch metrics and web request sample collection. See Visibility Configuration below for details.
  573. /// </summary>
  574. [Input("visibilityConfig")]
  575. public Input<Inputs.RuleGroupVisibilityConfigGetArgs>? VisibilityConfig { get; set; }
  576. public RuleGroupState()
  577. {
  578. }
  579. }
  580. }