updateTrigger method

Future<UpdateTriggerResponse> updateTrigger({
  1. required String name,
  2. required TriggerUpdate triggerUpdate,
})

Updates a trigger definition.

May throw InvalidInputException. May throw InternalServiceException. May throw EntityNotFoundException. May throw OperationTimeoutException. May throw ConcurrentModificationException.

Parameter name : The name of the trigger to update.

Parameter triggerUpdate : The new values with which to update the trigger.

Implementation

Future<UpdateTriggerResponse> updateTrigger({
  required String name,
  required TriggerUpdate triggerUpdate,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(triggerUpdate, 'triggerUpdate');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.UpdateTrigger'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      'TriggerUpdate': triggerUpdate,
    },
  );

  return UpdateTriggerResponse.fromJson(jsonResponse.body);
}