getRateBasedStatementManagedKeys method
May throw WAFInternalErrorException. May throw WAFInvalidParameterException. May throw WAFNonexistentItemException. May throw WAFInvalidOperationException.
Parameter ruleName
:
The name of the rate-based rule to get the keys for.
Parameter scope
:
Specifies whether this is for an AWS CloudFront distribution or for a
regional application. A regional application can be an Application Load
Balancer (ALB), an API Gateway REST API, or an AppSync GraphQL API.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. - API and SDKs - For all calls, use the Region endpoint us-east-1.
Parameter webACLId
:
The unique identifier for the Web ACL. This ID is returned in the
responses to create and list commands. You provide it to operations like
update and delete.
Parameter webACLName
:
The name of the Web ACL. You cannot change the name of a Web ACL after you
create it.
Implementation
Future<GetRateBasedStatementManagedKeysResponse>
getRateBasedStatementManagedKeys({
required String ruleName,
required Scope scope,
required String webACLId,
required String webACLName,
}) async {
ArgumentError.checkNotNull(ruleName, 'ruleName');
_s.validateStringLength(
'ruleName',
ruleName,
1,
128,
isRequired: true,
);
ArgumentError.checkNotNull(scope, 'scope');
ArgumentError.checkNotNull(webACLId, 'webACLId');
_s.validateStringLength(
'webACLId',
webACLId,
1,
36,
isRequired: true,
);
ArgumentError.checkNotNull(webACLName, 'webACLName');
_s.validateStringLength(
'webACLName',
webACLName,
1,
128,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSWAF_20190729.GetRateBasedStatementManagedKeys'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RuleName': ruleName,
'Scope': scope.toValue(),
'WebACLId': webACLId,
'WebACLName': webACLName,
},
);
return GetRateBasedStatementManagedKeysResponse.fromJson(jsonResponse.body);
}