updateSqlInjectionMatchSet method

Future<UpdateSqlInjectionMatchSetResponse> updateSqlInjectionMatchSet({
  1. required String changeToken,
  2. required String sqlInjectionMatchSetId,
  3. required List<SqlInjectionMatchSetUpdate> updates,
})

Implementation

Future<UpdateSqlInjectionMatchSetResponse> updateSqlInjectionMatchSet({
  required String changeToken,
  required String sqlInjectionMatchSetId,
  required List<SqlInjectionMatchSetUpdate> updates,
}) async {
  ArgumentError.checkNotNull(changeToken, 'changeToken');
  _s.validateStringLength(
    'changeToken',
    changeToken,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      sqlInjectionMatchSetId, 'sqlInjectionMatchSetId');
  _s.validateStringLength(
    'sqlInjectionMatchSetId',
    sqlInjectionMatchSetId,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(updates, 'updates');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSWAF_Regional_20161128.UpdateSqlInjectionMatchSet'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ChangeToken': changeToken,
      'SqlInjectionMatchSetId': sqlInjectionMatchSetId,
      'Updates': updates,
    },
  );

  return UpdateSqlInjectionMatchSetResponse.fromJson(jsonResponse.body);
}