Skip to content

Commit 429069b

Browse files
The targeted protection level of the Bot Control managed rule group now provides optional, machine-learning analysis of traffic statistics to detect some bot-related activity. You can enable or disable the machine learning functionality through the API.
1 parent 69cb512 commit 429069b

18 files changed

+282
-256
lines changed

generator/ServiceModels/wafv2/wafv2-2019-07-29.api.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,8 @@
939939
"type":"structure",
940940
"required":["InspectionLevel"],
941941
"members":{
942-
"InspectionLevel":{"shape":"InspectionLevel"}
942+
"InspectionLevel":{"shape":"InspectionLevel"},
943+
"EnableMachineLearning":{"shape":"Boolean"}
943944
}
944945
},
945946
"Action":{"type":"string"},

generator/ServiceModels/wafv2/wafv2-2019-07-29.docs.json

Lines changed: 16 additions & 15 deletions
Large diffs are not rendered by default.

generator/ServiceModels/wafv2/wafv2-2019-07-29.endpoint-rule-set.json

Lines changed: 154 additions & 190 deletions
Large diffs are not rendered by default.

generator/ServiceModels/wafv2/wafv2-2019-07-29.normal.json

Lines changed: 19 additions & 15 deletions
Large diffs are not rendered by default.

sdk/src/Services/WAFV2/Generated/Model/AWSManagedRulesBotControlRuleSet.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,44 @@ namespace Amazon.WAFV2.Model
3434
/// </summary>
3535
public partial class AWSManagedRulesBotControlRuleSet
3636
{
37+
private bool? _enableMachineLearning;
3738
private InspectionLevel _inspectionLevel;
3839

40+
/// <summary>
41+
/// Gets and sets the property EnableMachineLearning.
42+
/// <para>
43+
/// Applies only to the targeted inspection level.
44+
/// </para>
45+
///
46+
/// <para>
47+
/// Determines whether to use machine learning (ML) to analyze your web traffic for bot-related
48+
/// activity. Machine learning is required for the Bot Control rules <code>TGT_ML_CoordinatedActivityLow</code>
49+
/// and <code>TGT_ML_CoordinatedActivityMedium</code>, which inspect for anomalous behavior
50+
/// that might indicate distributed, coordinated bot activity.
51+
/// </para>
52+
///
53+
/// <para>
54+
/// For more information about this choice, see the listing for these rules in the table
55+
/// at <a href="https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html#aws-managed-rule-groups-bot-rules">Bot
56+
/// Control rules listing</a> in the <i>WAF Developer Guide</i>.
57+
/// </para>
58+
///
59+
/// <para>
60+
/// Default: <code>TRUE</code>
61+
/// </para>
62+
/// </summary>
63+
public bool EnableMachineLearning
64+
{
65+
get { return this._enableMachineLearning.GetValueOrDefault(); }
66+
set { this._enableMachineLearning = value; }
67+
}
68+
69+
// Check to see if EnableMachineLearning property is set
70+
internal bool IsSetEnableMachineLearning()
71+
{
72+
return this._enableMachineLearning.HasValue;
73+
}
74+
3975
/// <summary>
4076
/// Gets and sets the property InspectionLevel.
4177
/// <para>

sdk/src/Services/WAFV2/Generated/Model/AssociationConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace Amazon.WAFV2.Model
3535
///
3636
/// <para>
3737
/// Use this to customize the maximum size of the request body that your protected CloudFront
38-
/// distributions forward to WAF for inspection. The default is 16 KB (16,384 kilobytes).
38+
/// distributions forward to WAF for inspection. The default is 16 KB (16,384 bytes).
3939
///
4040
/// </para>
4141
/// <note>
@@ -54,7 +54,7 @@ public partial class AssociationConfig
5454
/// Gets and sets the property RequestBody.
5555
/// <para>
5656
/// Customizes the maximum size of the request body that your protected CloudFront distributions
57-
/// forward to WAF for inspection. The default size is 16 KB (16,384 kilobytes).
57+
/// forward to WAF for inspection. The default size is 16 KB (16,384 bytes).
5858
/// </para>
5959
/// <note>
6060
/// <para>

sdk/src/Services/WAFV2/Generated/Model/Body.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ public partial class Body
5151
/// </para>
5252
///
5353
/// <para>
54-
/// The default limit is 8 KB (8,192 kilobytes) for regional resources and 16 KB (16,384
55-
/// kilobytes) for CloudFront distributions. For CloudFront distributions, you can increase
56-
/// the limit in the web ACL <code>AssociationConfig</code>, for additional processing
57-
/// fees.
54+
/// The default limit is 8 KB (8,192 bytes) for regional resources and 16 KB (16,384 bytes)
55+
/// for CloudFront distributions. For CloudFront distributions, you can increase the limit
56+
/// in the web ACL <code>AssociationConfig</code>, for additional processing fees.
5857
/// </para>
5958
///
6059
/// <para>

sdk/src/Services/WAFV2/Generated/Model/CreateWebACLRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public partial class CreateWebACLRequest : AmazonWAFV2Request
7070
///
7171
/// <para>
7272
/// Use this to customize the maximum size of the request body that your protected CloudFront
73-
/// distributions forward to WAF for inspection. The default is 16 KB (16,384 kilobytes).
73+
/// distributions forward to WAF for inspection. The default is 16 KB (16,384 bytes).
7474
///
7575
/// </para>
7676
/// <note>

sdk/src/Services/WAFV2/Generated/Model/FieldToMatch.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ internal bool IsSetAllQueryArguments()
9595
///
9696
/// <para>
9797
/// A limited amount of the request body is forwarded to WAF for inspection by the underlying
98-
/// host service. For regional resources, the limit is 8 KB (8,192 kilobytes) and for
99-
/// CloudFront distributions, the limit is 16 KB (16,384 kilobytes). For CloudFront distributions,
100-
/// you can increase the limit in the web ACL's <code>AssociationConfig</code>, for additional
98+
/// host service. For regional resources, the limit is 8 KB (8,192 bytes) and for CloudFront
99+
/// distributions, the limit is 16 KB (16,384 bytes). For CloudFront distributions, you
100+
/// can increase the limit in the web ACL's <code>AssociationConfig</code>, for additional
101101
/// processing fees.
102102
/// </para>
103103
///
@@ -206,9 +206,9 @@ internal bool IsSetHeaders()
206206
///
207207
/// <para>
208208
/// A limited amount of the request body is forwarded to WAF for inspection by the underlying
209-
/// host service. For regional resources, the limit is 8 KB (8,192 kilobytes) and for
210-
/// CloudFront distributions, the limit is 16 KB (16,384 kilobytes). For CloudFront distributions,
211-
/// you can increase the limit in the web ACL's <code>AssociationConfig</code>, for additional
209+
/// host service. For regional resources, the limit is 8 KB (8,192 bytes) and for CloudFront
210+
/// distributions, the limit is 16 KB (16,384 bytes). For CloudFront distributions, you
211+
/// can increase the limit in the web ACL's <code>AssociationConfig</code>, for additional
212212
/// processing fees.
213213
/// </para>
214214
///

sdk/src/Services/WAFV2/Generated/Model/Internal/MarshallTransformations/AWSManagedRulesBotControlRuleSetMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ public class AWSManagedRulesBotControlRuleSetMarshaller : IRequestMarshaller<AWS
4545
/// <returns></returns>
4646
public void Marshall(AWSManagedRulesBotControlRuleSet requestObject, JsonMarshallerContext context)
4747
{
48+
if(requestObject.IsSetEnableMachineLearning())
49+
{
50+
context.Writer.WritePropertyName("EnableMachineLearning");
51+
context.Writer.Write(requestObject.EnableMachineLearning);
52+
}
53+
4854
if(requestObject.IsSetInspectionLevel())
4955
{
5056
context.Writer.WritePropertyName("InspectionLevel");

0 commit comments

Comments
 (0)