Java 类com.amazonaws.services.lambda.model.FunctionConfiguration 实例源码

项目:Muster    文件:LambdaMusterOrchestrationManager.java   
private static synchronized String getLambdaName(String service) {
    String lambdaName = serviceAndNametoLambdaName.get(service);

    if (lambdaName == null) {
        AWSLambdaClient lambdaClient = new AWSLambdaClient();
        ListFunctionsResult lambdas = lambdaClient.listFunctions();
        for (FunctionConfiguration lambda : lambdas.getFunctions()) {
            log.info("Have lambda with name {}", lambda.getFunctionName());

            String[] components = lambda.getFunctionName().split("\\-");
            if (components.length > 1) { // lambda format
                                            // stack-function-random
                serviceAndNametoLambdaName.put(components[1], lambda.getFunctionName());
            }
        }

    }

    lambdaName = serviceAndNametoLambdaName.get(service);
    log.info("am returning {} for lambda with name {}", lambdaName, service);

    return lambdaName;
}
项目:aws-lambda-deploy    文件:AWSLambdaDeployer.java   
private boolean needsConfigurationUpdate(GetFunctionResult getFunctionRes,
        String functionName, String handlerMethod) {
    boolean needsReDeploy = true;
    FunctionConfiguration conf = getFunctionRes.getConfiguration();

    if (conf.getHandler().equals(handlerMethod)) {
        if (conf.getMemorySize().equals(memory)) {
            if (conf.getRole().equals(lambdaRoleARN)) {
                if (conf.getTimeout().equals(handlerTimeout)) {
                    needsReDeploy = false;
                } else {
                    warnReDeploy(functionName, "timeout",
                            String.valueOf(conf.getTimeout()),
                            String.valueOf(handlerTimeout));
                }
            } else {
                warnReDeploy(functionName, "role", conf.getRole(),
                        lambdaRoleARN);
            }
        } else {
            warnReDeploy(functionName, "memory",
                    String.valueOf(conf.getMemorySize()),
                    String.valueOf(memory));
        }
    } else {
        warnReDeploy(functionName, "handler method", conf.getHandler(),
                handlerMethod);
    }

    return needsReDeploy;
}
项目:intellij-idea-plugin-connector-for-aws-lambda    文件:FunctionEntry.java   
public FunctionEntry(FunctionConfiguration configuration) {
    functionName = configuration.getFunctionName();
    runtime = Runtime.fromValue(configuration.getRuntime());
    handler = configuration.getHandler();
}