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

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

Introduction

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

Prototype

UpdatePipelineStatusResult updatePipelineStatus(UpdatePipelineStatusRequest updatePipelineStatusRequest);

Source Link

Document

The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of jobs.

Usage

From source file:org.alanwilliamson.amazon.transcoder.pipeline.UpdateStatus.java

License:Open Source License

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

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

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

    try {// www.  j  a  va 2  s . c o  m
        et.updatePipelineStatus(new UpdatePipelineStatusRequest().withId(pipelineid).withStatus(status));
    } catch (Exception e) {
        throwException(_session, "AmazonElasticTranscoder: " + e.getMessage());
    }

    return cfBooleanData.TRUE;
}