use of com.amazonaws.services.lambda.model.ListFunctionsResult in project aws-doc-sdk-examples by awsdocs.
the class ListFunctions method main.
public static void main(String[] args) {
// snippet-start:[lambda.java1.list.main]
ListFunctionsResult functionResult = null;
try {
AWSLambda awsLambda = AWSLambdaClientBuilder.standard().withCredentials(new ProfileCredentialsProvider()).withRegion(Regions.US_WEST_2).build();
functionResult = awsLambda.listFunctions();
List<FunctionConfiguration> list = functionResult.getFunctions();
for (Iterator iter = list.iterator(); iter.hasNext(); ) {
FunctionConfiguration config = (FunctionConfiguration) iter.next();
System.out.println("The function name is " + config.getFunctionName());
}
} catch (ServiceException e) {
System.out.println(e);
}
// snippet-end:[lambda.java1.list.main]
}
Aggregations