AWS Code Sample


List_Jobs.php demonstrates how to list an jobs.

<?php /** * Copyright 2010-2019, Inc. or its affiliates. All Rights Reserved. * * This file is licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. A copy of * the License is located at * * * * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * ABOUT THIS PHP SAMPLE: This sample is part of the Elastic Transcoder Developer Guide topic at * * */ // Path to your PHP autoload. If you are using a phar installation, this is the // path to your aws.phar file. require 'vendor/autoload.php'; use Aws\ElasticTranscoder\ElasticTranscoderClient; use Aws\Exception\AwsException; /** * List Elastic Transcoder jobs. * * This code expects that you have AWS credentials set up per: * */ // Create the client for Elastic Transcoder. $transcoder_client = new ElasticTranscoderClient([ 'profile' => 'default', 'region' => 'us-east-2', 'version' => '2012-09-25', ]); $pipelineID = '1549322799801-b1yvqs'; try { $result = $transcoder_client -> listJobsByPipeline([ 'PipelineId' => $pipelineID, ]); var_dump($result); } catch (AwsException $e) { // output error message if fails echo $e->getMessage() . "\n"; } ?>

Sample Details

Service: elastictranscoder

Last tested:

Author: AWS

Type: full-example

On this page: