stopJob method
Stops a job that is in progress for a branch of an Amplify app.
May throw BadRequestException. May throw UnauthorizedException. May throw InternalFailureException. May throw NotFoundException. May throw LimitExceededException.
Parameter appId
:
The unique ID for an Amplify app.
Parameter branchName
:
The name for the branch, for the job.
Parameter jobId
:
The unique id for the job.
Implementation
Future<StopJobResult> stopJob({
required String appId,
required String branchName,
required String jobId,
}) async {
ArgumentError.checkNotNull(appId, 'appId');
_s.validateStringLength(
'appId',
appId,
1,
20,
isRequired: true,
);
ArgumentError.checkNotNull(branchName, 'branchName');
_s.validateStringLength(
'branchName',
branchName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(jobId, 'jobId');
_s.validateStringLength(
'jobId',
jobId,
0,
255,
isRequired: true,
);
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/apps/${Uri.encodeComponent(appId)}/branches/${Uri.encodeComponent(branchName)}/jobs/${Uri.encodeComponent(jobId)}/stop',
exceptionFnMap: _exceptionFns,
);
return StopJobResult.fromJson(response);
}