Example usage for com.amazonaws.services.lambda.model PublishVersionRequest withDescription

List of usage examples for com.amazonaws.services.lambda.model PublishVersionRequest withDescription

Introduction

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

Prototype


public PublishVersionRequest withDescription(String description) 

Source Link

Document

A description for the version to override the description in the function configuration.

Usage

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

License:Apache License

@TaskAction
public void publishVersion() {

    final String functionName = getFunctionName();

    if (functionName == null) {
        throw new GradleException("functionName is required");
    }//from   w  ww  .  ja  v  a 2s. co  m

    final AWSLambda lambda = getAwsLambdaClient();

    PublishVersionRequest request = new PublishVersionRequest().withFunctionName(functionName);

    if (getCodeSha256() != null) {
        request.withCodeSha256(getCodeSha256());
    }
    if (getDescription() != null) {
        request.withDescription(getDescription());
    }

    publishVersionResult = lambda.publishVersion(request);

    getLogger().info("Publish lambda version for {} succeeded with version {}", functionName,
            publishVersionResult.getVersion());
}