/AWS1/IF_WA2=>ASSOCIATEWEBACL()¶
About AssociateWebACL¶
Associates a web ACL with a resource, to protect the resource.
Use this for all resource types except for Amazon CloudFront distributions. For Amazon CloudFront, call UpdateDistribution for the distribution and provide the Amazon Resource Name (ARN) of the web ACL in the web ACL ID. For information, see UpdateDistribution in the Amazon CloudFront Developer Guide.
Required permissions for customer-managed IAM policies
This call requires permissions that are specific to the protected resource type. For details, see Permissions for AssociateWebACL in the WAF Developer Guide.
Temporary inconsistencies during updates
When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes.
The following are examples of the temporary inconsistencies that you might notice during change propagation:
-
After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable.
-
After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another.
-
After you change a rule action setting, you might see the old action in some places and the new action in others.
-
After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another.
Method Signature¶
METHODS /AWS1/IF_WA2~ASSOCIATEWEBACL
IMPORTING
!IV_WEBACLARN TYPE /AWS1/WA2RESOURCEARN OPTIONAL
!IV_RESOURCEARN TYPE /AWS1/WA2RESOURCEARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wa2assocwebaclrsp
RAISING
/AWS1/CX_WA2WAFINTERNALERROREX
/AWS1/CX_WA2WAFINVALIDOPEX
/AWS1/CX_WA2WAFINVALIDPARAMEX
/AWS1/CX_WA2WAFLIMITSEXCDEX
/AWS1/CX_WA2WAFNONEXENTITEMEX
/AWS1/CX_WA2WAFUNAVAILENTITYEX
/AWS1/CX_WA2CLIENTEXC
/AWS1/CX_WA2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_webaclarn TYPE /AWS1/WA2RESOURCEARN /AWS1/WA2RESOURCEARN¶
The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
iv_resourcearn TYPE /AWS1/WA2RESOURCEARN /AWS1/WA2RESOURCEARN¶
The Amazon Resource Name (ARN) of the resource to associate with the web ACL.
The ARN must be in one of the following formats:
For an Application Load Balancer:
arn:partition:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-idFor an Amazon API Gateway REST API:
arn:partition:apigateway:region::/restapis/api-id/stages/stage-nameFor an AppSync GraphQL API:
arn:partition:appsync:region:account-id:apis/GraphQLApiIdFor an Amazon Cognito user pool:
arn:partition:cognito-idp:region:account-id:userpool/user-pool-idFor an App Runner service:
arn:partition:apprunner:region:account-id:service/apprunner-service-name/apprunner-service-idFor an Amazon Web Services Verified Access instance:
arn:partition:ec2:region:account-id:verified-access-instance/instance-idFor an Amplify application:
arn:partition:amplify:region:account-id:apps/app-id
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wa2assocwebaclrsp /AWS1/CL_WA2ASSOCWEBACLRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->associatewebacl(
iv_resourcearn = |string|
iv_webaclarn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.