Example usage for com.amazonaws.services.elastictranscoder.model UpdatePipelineStatusRequest UpdatePipelineStatusRequest

List of usage examples for com.amazonaws.services.elastictranscoder.model UpdatePipelineStatusRequest UpdatePipelineStatusRequest

Introduction

In this page you can find the example usage for com.amazonaws.services.elastictranscoder.model UpdatePipelineStatusRequest UpdatePipelineStatusRequest.

Prototype

UpdatePipelineStatusRequest

Source Link

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 {//from  w w  w  .j a va 2  s.c  om
        et.updatePipelineStatus(new UpdatePipelineStatusRequest().withId(pipelineid).withStatus(status));
    } catch (Exception e) {
        throwException(_session, "AmazonElasticTranscoder: " + e.getMessage());
    }

    return cfBooleanData.TRUE;
}