Search in sources :

Example 1 with ListFunctionsResponse

use of software.amazon.awssdk.services.lambda.model.ListFunctionsResponse in project aws-doc-sdk-examples by awsdocs.

the class ListLambdaFunctions method listFunctions.

// snippet-start:[lambda.java2.list.main]
public static void listFunctions(LambdaClient awsLambda) {
    try {
        ListFunctionsResponse functionResult = awsLambda.listFunctions();
        List<FunctionConfiguration> list = functionResult.functions();
        for (FunctionConfiguration config : list) {
            System.out.println("The function name is " + config.functionName());
        }
    } catch (LambdaException e) {
        System.err.println(e.getMessage());
        System.exit(1);
    }
}
Also used : ListFunctionsResponse(software.amazon.awssdk.services.lambda.model.ListFunctionsResponse) FunctionConfiguration(software.amazon.awssdk.services.lambda.model.FunctionConfiguration) LambdaException(software.amazon.awssdk.services.lambda.model.LambdaException)

Aggregations

FunctionConfiguration (software.amazon.awssdk.services.lambda.model.FunctionConfiguration)1 LambdaException (software.amazon.awssdk.services.lambda.model.LambdaException)1 ListFunctionsResponse (software.amazon.awssdk.services.lambda.model.ListFunctionsResponse)1