deleteJob method

Future<DeleteJobResult> deleteJob({
  1. required String appId,
  2. required String branchName,
  3. required String jobId,
})

Deletes a job 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<DeleteJobResult> deleteJob({
  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)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteJobResult.fromJson(response);
}