pollForJobs method
- required ActionTypeId actionTypeId,
- int? maxBatchSize,
- Map<
String, String> ? queryParam,
Returns information about any jobs for AWS CodePipeline to act on.
PollForJobs
is valid only for action types with "Custom" in
the owner field. If the action type contains "AWS" or "ThirdParty" in the
owner field, the PollForJobs
action returns an error.
May throw ValidationException. May throw ActionTypeNotFoundException.
Parameter actionTypeId
:
Represents information about an action type.
Parameter maxBatchSize
:
The maximum number of jobs to return in a poll for jobs call.
Parameter queryParam
:
A map of property names and values. For an action type with no queryable
properties, this value must be null or an empty map. For an action type
with a queryable property, you must supply that property as a key in the
map. Only jobs whose action configuration matches the mapped value are
returned.
Implementation
Future<PollForJobsOutput> pollForJobs({
required ActionTypeId actionTypeId,
int? maxBatchSize,
Map<String, String>? queryParam,
}) 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.PollForJobs'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'actionTypeId': actionTypeId,
if (maxBatchSize != null) 'maxBatchSize': maxBatchSize,
if (queryParam != null) 'queryParam': queryParam,
},
);
return PollForJobsOutput.fromJson(jsonResponse.body);
}