getSampledRequests method
Future<GetSampledRequestsResponse>
getSampledRequests({
- required int maxItems,
- required String ruleId,
- required TimeWindow timeWindow,
- required String webAclId,
Implementation
Future<GetSampledRequestsResponse> getSampledRequests({
required int maxItems,
required String ruleId,
required TimeWindow timeWindow,
required String webAclId,
}) async {
ArgumentError.checkNotNull(maxItems, 'maxItems');
_s.validateNumRange(
'maxItems',
maxItems,
1,
500,
isRequired: true,
);
ArgumentError.checkNotNull(ruleId, 'ruleId');
_s.validateStringLength(
'ruleId',
ruleId,
1,
128,
isRequired: true,
);
ArgumentError.checkNotNull(timeWindow, 'timeWindow');
ArgumentError.checkNotNull(webAclId, 'webAclId');
_s.validateStringLength(
'webAclId',
webAclId,
1,
128,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSWAF_Regional_20161128.GetSampledRequests'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MaxItems': maxItems,
'RuleId': ruleId,
'TimeWindow': timeWindow,
'WebAclId': webAclId,
},
);
return GetSampledRequestsResponse.fromJson(jsonResponse.body);
}