Class AssociationConfig
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<AssociationConfig.Builder,AssociationConfig>
Specifies custom configurations for the associations between the web ACL and protected resources.
Use this to customize the maximum size of the request body that your protected resources forward to WAF for inspection. You can customize this setting for Application Load Balancer, CloudFront, API Gateway, Amazon Cognito, App Runner, Verified Access, or Elastic Load Balancing for Envoy resources. The default setting is 8 KB (8,192 bytes) for Application Load Balancer and 16 KB (16,384 bytes) for the other resource types.
You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see WAF Pricing.
For AppSync, the limit is fixed at 8 KB (8,192 bytes).
You can also use this to have your CloudFront distributions insert the WAF challenge JavaScript SDK into the HTML
responses that they return. For more information, see the ChallengeJavascriptSdkInjection setting.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AssociationConfig.Builderbuilder()Specifies the CloudFront distributions that insert the WAF challenge JavaScript SDK into the HTML responses that they return.Specifies the CloudFront distributions that insert the WAF challenge JavaScript SDK into the HTML responses that they return.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the ChallengeJavascriptSdkInjection property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the RequestBody property.Customizes the maximum size of the request body that your protected Application Load Balancer, CloudFront, API Gateway, Amazon Cognito, App Runner, Verified Access, and Elastic Load Balancing for Envoy resources forward to WAF for inspection.Customizes the maximum size of the request body that your protected Application Load Balancer, CloudFront, API Gateway, Amazon Cognito, App Runner, Verified Access, and Elastic Load Balancing for Envoy resources forward to WAF for inspection.static Class<? extends AssociationConfig.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
requestBody
Customizes the maximum size of the request body that your protected Application Load Balancer, CloudFront, API Gateway, Amazon Cognito, App Runner, Verified Access, and Elastic Load Balancing for Envoy resources forward to WAF for inspection. The default size is 8 KB (8,192 bytes) for Application Load Balancer and 16 KB (16,384 bytes) for the other resource types. You can change the setting for any of the available resource types.
You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see WAF Pricing.
Example JSON:
{ "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32", "APPLICATION_LOAD_BALANCER": "KB_16" }For AppSync, the limit is fixed at 8 KB (8,192 bytes).
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRequestBody()method.- Returns:
- Customizes the maximum size of the request body that your protected Application Load Balancer,
CloudFront, API Gateway, Amazon Cognito, App Runner, Verified Access, and Elastic Load Balancing for
Envoy resources forward to WAF for inspection. The default size is 8 KB (8,192 bytes) for Application
Load Balancer and 16 KB (16,384 bytes) for the other resource types. You can change the setting for any
of the available resource types.
You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see WAF Pricing.
Example JSON:
{ "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32", "APPLICATION_LOAD_BALANCER": "KB_16" }For AppSync, the limit is fixed at 8 KB (8,192 bytes).
-
hasRequestBody
public final boolean hasRequestBody()For responses, this returns true if the service returned a value for the RequestBody property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
requestBodyAsStrings
Customizes the maximum size of the request body that your protected Application Load Balancer, CloudFront, API Gateway, Amazon Cognito, App Runner, Verified Access, and Elastic Load Balancing for Envoy resources forward to WAF for inspection. The default size is 8 KB (8,192 bytes) for Application Load Balancer and 16 KB (16,384 bytes) for the other resource types. You can change the setting for any of the available resource types.
You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see WAF Pricing.
Example JSON:
{ "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32", "APPLICATION_LOAD_BALANCER": "KB_16" }For AppSync, the limit is fixed at 8 KB (8,192 bytes).
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRequestBody()method.- Returns:
- Customizes the maximum size of the request body that your protected Application Load Balancer,
CloudFront, API Gateway, Amazon Cognito, App Runner, Verified Access, and Elastic Load Balancing for
Envoy resources forward to WAF for inspection. The default size is 8 KB (8,192 bytes) for Application
Load Balancer and 16 KB (16,384 bytes) for the other resource types. You can change the setting for any
of the available resource types.
You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see WAF Pricing.
Example JSON:
{ "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32", "APPLICATION_LOAD_BALANCER": "KB_16" }For AppSync, the limit is fixed at 8 KB (8,192 bytes).
-
challengeJavascriptSdkInjection
public final Map<AssociatedResourceType,ChallengeJavascriptSdkInjectionConfig> challengeJavascriptSdkInjection()Specifies the CloudFront distributions that insert the WAF challenge JavaScript SDK into the HTML responses that they return. When you enable this setting for a distribution, you do not add the SDK to your web pages yourself.
You can configure this setting only for CloudFront distributions, using the
CLOUDFRONTmap key. WAF rejects any other resource type, and the setting is not available for regional resources. To configure it, use the CloudFront scope.Your web ACL must also contain at least one of the following qualifying managed rule groups. WAF Bot Control qualifies only at the
TARGETEDinspection level, not atCOMMON:-
The WAF Bot Control managed rule group
AWSManagedRulesBotControlRuleSet, with the inspection level set toTARGETED. -
The WAF Fraud Control account takeover prevention (ATP) managed rule group
AWSManagedRulesATPRuleSet. -
The WAF Fraud Control account creation fraud prevention (ACFP) managed rule group
AWSManagedRulesACFPRuleSet.
If you remove the last qualifying managed rule group from the web ACL, or lower the WAF Bot Control inspection level from
TARGETEDtoCOMMON, you must remove this setting in the same update. Otherwise, WAF rejects the update.Example JSON:
{ "CLOUDFRONT": {} }If you omit this setting, CloudFront does not insert the SDK. When you omit it from a web ACL that previously used it, cached HTML that already contains the SDK is still served until it expires, or until you invalidate the cache for that distribution. For more information, see Automatic SDK integration for CloudFront distributions in the WAF Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasChallengeJavascriptSdkInjection()method.- Returns:
- Specifies the CloudFront distributions that insert the WAF challenge JavaScript SDK into the HTML
responses that they return. When you enable this setting for a distribution, you do not add the SDK to
your web pages yourself.
You can configure this setting only for CloudFront distributions, using the
CLOUDFRONTmap key. WAF rejects any other resource type, and the setting is not available for regional resources. To configure it, use the CloudFront scope.Your web ACL must also contain at least one of the following qualifying managed rule groups. WAF Bot Control qualifies only at the
TARGETEDinspection level, not atCOMMON:-
The WAF Bot Control managed rule group
AWSManagedRulesBotControlRuleSet, with the inspection level set toTARGETED. -
The WAF Fraud Control account takeover prevention (ATP) managed rule group
AWSManagedRulesATPRuleSet. -
The WAF Fraud Control account creation fraud prevention (ACFP) managed rule group
AWSManagedRulesACFPRuleSet.
If you remove the last qualifying managed rule group from the web ACL, or lower the WAF Bot Control inspection level from
TARGETEDtoCOMMON, you must remove this setting in the same update. Otherwise, WAF rejects the update.Example JSON:
{ "CLOUDFRONT": {} }If you omit this setting, CloudFront does not insert the SDK. When you omit it from a web ACL that previously used it, cached HTML that already contains the SDK is still served until it expires, or until you invalidate the cache for that distribution. For more information, see Automatic SDK integration for CloudFront distributions in the WAF Developer Guide.
-
-
-
hasChallengeJavascriptSdkInjection
public final boolean hasChallengeJavascriptSdkInjection()For responses, this returns true if the service returned a value for the ChallengeJavascriptSdkInjection property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
challengeJavascriptSdkInjectionAsStrings
public final Map<String,ChallengeJavascriptSdkInjectionConfig> challengeJavascriptSdkInjectionAsStrings()Specifies the CloudFront distributions that insert the WAF challenge JavaScript SDK into the HTML responses that they return. When you enable this setting for a distribution, you do not add the SDK to your web pages yourself.
You can configure this setting only for CloudFront distributions, using the
CLOUDFRONTmap key. WAF rejects any other resource type, and the setting is not available for regional resources. To configure it, use the CloudFront scope.Your web ACL must also contain at least one of the following qualifying managed rule groups. WAF Bot Control qualifies only at the
TARGETEDinspection level, not atCOMMON:-
The WAF Bot Control managed rule group
AWSManagedRulesBotControlRuleSet, with the inspection level set toTARGETED. -
The WAF Fraud Control account takeover prevention (ATP) managed rule group
AWSManagedRulesATPRuleSet. -
The WAF Fraud Control account creation fraud prevention (ACFP) managed rule group
AWSManagedRulesACFPRuleSet.
If you remove the last qualifying managed rule group from the web ACL, or lower the WAF Bot Control inspection level from
TARGETEDtoCOMMON, you must remove this setting in the same update. Otherwise, WAF rejects the update.Example JSON:
{ "CLOUDFRONT": {} }If you omit this setting, CloudFront does not insert the SDK. When you omit it from a web ACL that previously used it, cached HTML that already contains the SDK is still served until it expires, or until you invalidate the cache for that distribution. For more information, see Automatic SDK integration for CloudFront distributions in the WAF Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasChallengeJavascriptSdkInjection()method.- Returns:
- Specifies the CloudFront distributions that insert the WAF challenge JavaScript SDK into the HTML
responses that they return. When you enable this setting for a distribution, you do not add the SDK to
your web pages yourself.
You can configure this setting only for CloudFront distributions, using the
CLOUDFRONTmap key. WAF rejects any other resource type, and the setting is not available for regional resources. To configure it, use the CloudFront scope.Your web ACL must also contain at least one of the following qualifying managed rule groups. WAF Bot Control qualifies only at the
TARGETEDinspection level, not atCOMMON:-
The WAF Bot Control managed rule group
AWSManagedRulesBotControlRuleSet, with the inspection level set toTARGETED. -
The WAF Fraud Control account takeover prevention (ATP) managed rule group
AWSManagedRulesATPRuleSet. -
The WAF Fraud Control account creation fraud prevention (ACFP) managed rule group
AWSManagedRulesACFPRuleSet.
If you remove the last qualifying managed rule group from the web ACL, or lower the WAF Bot Control inspection level from
TARGETEDtoCOMMON, you must remove this setting in the same update. Otherwise, WAF rejects the update.Example JSON:
{ "CLOUDFRONT": {} }If you omit this setting, CloudFront does not insert the SDK. When you omit it from a web ACL that previously used it, cached HTML that already contains the SDK is still served until it expires, or until you invalidate the cache for that distribution. For more information, see Automatic SDK integration for CloudFront distributions in the WAF Developer Guide.
-
-
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<AssociationConfig.Builder,AssociationConfig> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-