List of usage examples for com.amazonaws.services.apigateway.model GetRestApisRequest setPosition
public void setPosition(String position)
The current pagination position in the paged result set.
From source file:br.com.ingenieux.mojo.apigateway.AbstractAPIGatewayMojo.java
License:Apache License
protected void lookupIds() throws Exception { GetRestApisRequest req = new GetRestApisRequest(); String position = ""; do {/*from w ww . ja va 2 s . c o m*/ final GetRestApisResult apiList = getService().getRestApis(req); final Optional<RestApi> api = apiList.getItems().stream() .filter(restApi -> restApi.getName().equals(restApiName)).findFirst(); if (api.isPresent()) { getLog().info("Using api: " + api.get()); this.restApiId = api.get().getId(); break; } position = apiList.getPosition(); req.setPosition(position); } while (isNotBlank(position)); if (isBlank(restApiId)) return; updateEndpoint(); }