disassociateWebACL method
Disassociates a Web ACL from a regional application resource. A regional
application can be an Application Load Balancer (ALB), an API Gateway REST
API, or an AppSync GraphQL API.
For AWS CloudFront, don't use this call. Instead, use your CloudFront
distribution configuration. To disassociate a Web ACL, provide an empty
web ACL ID in the CloudFront call UpdateDistribution
. For
information, see UpdateDistribution.
May throw WAFInternalErrorException. May throw WAFInvalidParameterException. May throw WAFNonexistentItemException. May throw WAFInvalidOperationException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) of the resource to disassociate from the
web ACL.
The ARN must be in one of the following formats:
-
For an Application Load Balancer:
arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
-
For an API Gateway REST API:
arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
-
For an AppSync GraphQL API:
arn:aws:appsync:region:account-id:apis/GraphQLApiId
Implementation
Future<void> disassociateWebACL({
required String resourceArn,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
_s.validateStringLength(
'resourceArn',
resourceArn,
20,
2048,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSWAF_20190729.DisassociateWebACL'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
},
);
}