1

I am trying to get the all Presets from AWS Elastic Transcoder but the following code returns only 50 out of 62

List<Preset> presets = amazonElasticTranscoder.listPresets().getPresets();
  1. How do I get all presets (include custom presets)??
  2. Is there any possible to get Preset using presetName??
SST
  • 2,054
  • 5
  • 35
  • 65

1 Answers1

1

The responses from AWS come in pages of 50. To get the next page, take the nextPageToken from the ListPresetsResult you got, and use it in another call:

ListPresetsRequest request = new ListPresetsRequest();
request.setPageToken(result.getNextPageToken());
amazonElasticTranscoder.listPresets(request);

There doesn't seem to be a way to find a preset by name in the Java API.

Kraylog
  • 7,383
  • 1
  • 24
  • 35