Example usage for com.amazonaws.services.lambda.model ListAliasesResult getNextMarker

List of usage examples for com.amazonaws.services.lambda.model ListAliasesResult getNextMarker

Introduction

In this page you can find the example usage for com.amazonaws.services.lambda.model ListAliasesResult getNextMarker.

Prototype


public String getNextMarker() 

Source Link

Document

The pagination token that's included if more results are available.

Usage

From source file:com.netflix.spinnaker.clouddriver.lambda.provider.agent.LambdaCachingAgent.java

License:Apache License

private List<AliasConfiguration> listAliasConfiguration(String functionArn) {
    AWSLambda lambda = amazonClientProvider.getAmazonLambda(account, region);
    String nextMarker = null;/*  www. ja  va 2 s  . com*/
    List<AliasConfiguration> aliasConfigurations = new ArrayList<>();
    do {
        ListAliasesRequest listAliasesRequest = new ListAliasesRequest();
        listAliasesRequest.setFunctionName(functionArn);
        if (nextMarker != null) {
            listAliasesRequest.setMarker(nextMarker);
        }

        ListAliasesResult listAliasesResult = lambda.listAliases(listAliasesRequest);
        for (AliasConfiguration x : listAliasesResult.getAliases()) {
            aliasConfigurations.add(x);
        }
        nextMarker = listAliasesResult.getNextMarker();

    } while (nextMarker != null && nextMarker.length() != 0);
    return aliasConfigurations;

}