getTriggers method

Future<GetTriggersResponse> getTriggers({
  1. String? dependentJobName,
  2. int? maxResults,
  3. String? nextToken,
})

Gets all the triggers associated with a job.

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

Parameter dependentJobName : The name of the job to retrieve triggers for. The trigger that can start this job is returned, and if there is no such trigger, all triggers are returned.

Parameter maxResults : The maximum size of the response.

Parameter nextToken : A continuation token, if this is a continuation call.

Implementation

Future<GetTriggersResponse> getTriggers({
  String? dependentJobName,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateStringLength(
    'dependentJobName',
    dependentJobName,
    1,
    255,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.GetTriggers'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (dependentJobName != null) 'DependentJobName': dependentJobName,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return GetTriggersResponse.fromJson(jsonResponse.body);
}