Example usage for com.amazonaws.services.lambda.model UpdateFunctionConfigurationResult getFunctionArn

List of usage examples for com.amazonaws.services.lambda.model UpdateFunctionConfigurationResult getFunctionArn

Introduction

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

Prototype


public String getFunctionArn() 

Source Link

Document

The function's Amazon Resource Name (ARN).

Usage

From source file:jp.classmethod.aws.gradle.lambda.AWSLambdaMigrateFunctionTask.java

License:Apache License

private void updateFunctionConfiguration(AWSLambda lambda, FunctionConfiguration config) {
    String updateFunctionName = getFunctionName();
    if (updateFunctionName == null) {
        updateFunctionName = config.getFunctionName();
    }//w  w  w . j  ava  2s  . c o m

    String updateRole = getRole();
    if (updateRole == null) {
        updateRole = config.getRole();
    }

    Runtime updateRuntime = getRuntime();
    if (updateRuntime == null) {
        updateRuntime = Runtime.fromValue(config.getRuntime());
    }

    String updateHandler = getHandler();
    if (updateHandler == null) {
        updateHandler = config.getHandler();
    }

    String updateDescription = getFunctionDescription();
    if (updateDescription == null) {
        updateDescription = config.getDescription();
    }

    Integer updateTimeout = getTimeout();
    if (updateTimeout == null) {
        updateTimeout = config.getTimeout();
    }

    Integer updateMemorySize = getMemorySize();
    if (updateMemorySize == null) {
        updateMemorySize = config.getMemorySize();
    }

    UpdateFunctionConfigurationRequest request = new UpdateFunctionConfigurationRequest()
            .withFunctionName(updateFunctionName).withRole(updateRole).withRuntime(updateRuntime)
            .withHandler(updateHandler).withDescription(updateDescription).withTimeout(updateTimeout)
            .withVpcConfig(getVpcConfig()).withEnvironment(new Environment().withVariables(getEnvironment()))
            .withMemorySize(updateMemorySize);

    UpdateFunctionConfigurationResult updateFunctionConfiguration = lambda.updateFunctionConfiguration(request);
    getLogger().info("Update Lambda function configuration requested: {}",
            updateFunctionConfiguration.getFunctionArn());
}

From source file:org.xmlsh.aws.gradle.lambda.AWSLambdaMigrateFunctionTask.java

License:BSD License

private void updateFunctionConfiguration(AWSLambda lambda, GetFunctionResult getFunctionResult) {
    UpdateFunctionConfigurationRequest request = new UpdateFunctionConfigurationRequest()
            .withFunctionName(getFunctionName()).withRole(getRole()).withHandler(getHandler())
            .withDescription(getFunctionDescription()).withTimeout(getTimeout())
            .withMemorySize(getMemorySize());
    UpdateFunctionConfigurationResult updateFunctionConfiguration = lambda.updateFunctionConfiguration(request);
    getLogger().info("Update Lambda function configuration requested: {}",
            updateFunctionConfiguration.getFunctionArn());
}