pollForThirdPartyJobs method

Future<PollForThirdPartyJobsOutput> pollForThirdPartyJobs({
  1. required ActionTypeId actionTypeId,
  2. int? maxBatchSize,
})

Determines whether there are any third party jobs for a job worker to act on. Used for partner actions only.

May throw ActionTypeNotFoundException. May throw ValidationException.

Parameter actionTypeId : Represents information about an action type.

Parameter maxBatchSize : The maximum number of jobs to return in a poll for jobs call.

Implementation

Future<PollForThirdPartyJobsOutput> pollForThirdPartyJobs({
  required ActionTypeId actionTypeId,
  int? maxBatchSize,
}) async {
  ArgumentError.checkNotNull(actionTypeId, 'actionTypeId');
  _s.validateNumRange(
    'maxBatchSize',
    maxBatchSize,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.PollForThirdPartyJobs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'actionTypeId': actionTypeId,
      if (maxBatchSize != null) 'maxBatchSize': maxBatchSize,
    },
  );

  return PollForThirdPartyJobsOutput.fromJson(jsonResponse.body);
}