无法从AWS Elastic Transcoder获取所有预定义的预设

时间:2017-12-12 13:21:36

标签: java amazon-web-services amazon-elastic-transcoder

我正在尝试从AWS Elastic Transcoder获取所有预设,但以下代码仅返回62个中的50个

List<Preset> presets = amazonElasticTranscoder.listPresets().getPresets();
  1. 如何获取所有预设(包括自定义预设)?
  2. 是否有可能使用presetName ??
  3. 获取Preset

1 个答案:

答案 0 :(得分: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.