Example usage for com.amazonaws.services.elastictranscoder AmazonElasticTranscoder cancelJob

List of usage examples for com.amazonaws.services.elastictranscoder AmazonElasticTranscoder cancelJob

Introduction

In this page you can find the example usage for com.amazonaws.services.elastictranscoder AmazonElasticTranscoder cancelJob.

Prototype

CancelJobResult cancelJob(CancelJobRequest cancelJobRequest);

Source Link

Document

The CancelJob operation cancels an unfinished job.

Usage

From source file:org.alanwilliamson.amazon.transcoder.job.Cancel.java

License:Open Source License

public cfData execute(cfSession _session, cfArgStructData argStruct) throws cfmRunTimeException {
    AmazonKey amazonKey = getAmazonKey(_session, argStruct);
    AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

    String jobid = getNamedStringParam(argStruct, "jobid", null);
    if (jobid == null)
        throwException(_session, "Please specify a jobid");

    try {//from  w ww .j  a  v a2 s.c o m
        et.cancelJob(new CancelJobRequest().withId(jobid));
    } catch (Exception e) {
        throwException(_session, "AmazonElasticTranscoder: " + e.getMessage());
    }

    return cfBooleanData.TRUE;
}