getWebACLForResource method
Retrieves the WebACL for the specified resource.
May throw WAFInternalErrorException. May throw WAFNonexistentItemException. May throw WAFInvalidParameterException. May throw WAFUnavailableEntityException. May throw WAFInvalidOperationException.
Parameter resourceArn
:
The ARN (Amazon Resource Name) of the resource.
Implementation
Future<GetWebACLForResourceResponse> getWebACLForResource({
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.GetWebACLForResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
},
);
return GetWebACLForResourceResponse.fromJson(jsonResponse.body);
}