Example usage for com.amazonaws.services.apigateway.model GetRestApisResult getPosition

List of usage examples for com.amazonaws.services.apigateway.model GetRestApisResult getPosition

Introduction

In this page you can find the example usage for com.amazonaws.services.apigateway.model GetRestApisResult getPosition.

Prototype


public String getPosition() 

Source Link

Usage

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 {//w  w w. ja  v  a 2  s.com
        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();
}