![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.lambda.kotlin.outputs.FunctionCode.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.lambda.kotlin.outputs
import kotlin.String
import kotlin.Suppress
/**
* The [deployment package](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html) for a Lambda function. To deploy a function defined as a container image, you specify the location of a container image in the Amazon ECR registry. For a .zip file deployment package, you can specify the location of an object in Amazon S3. For Node.js and Python functions, you can specify the function code inline in the template.
* Changes to a deployment package in Amazon S3 or a container image in ECR are not detected automatically during stack updates. To update the function code, change the object key or version in the template.
* @property imageUri URI of a [container image](https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html) in the Amazon ECR registry.
* @property s3Bucket An Amazon S3 bucket in the same AWS-Region as your function. The bucket can be in a different AWS-account.
* @property s3Key The Amazon S3 key of the deployment package.
* @property s3ObjectVersion For versioned objects, the version of the deployment package object to use.
* @property sourceKmsKeyArn
* @property zipFile (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, CFN places it in a file named ``index`` and zips it to create a [deployment package](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html). This zip file cannot exceed 4MB. For the ``Handler`` property, the first part of the handler identifier must be ``index``. For example, ``index.handler``.
* For JSON, you must escape quotes and special characters such as newline (``\n``) with a backslash.
* If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module ([cfn-response](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-lambda-function-code-cfnresponsemodule.html)) that simplifies sending responses. See [Using Lambda with CloudFormation](https://docs.aws.amazon.com/lambda/latest/dg/services-cloudformation.html) for details.
*/
public data class FunctionCode(
public val imageUri: String? = null,
public val s3Bucket: String? = null,
public val s3Key: String? = null,
public val s3ObjectVersion: String? = null,
public val sourceKmsKeyArn: String? = null,
public val zipFile: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.lambda.outputs.FunctionCode): FunctionCode =
FunctionCode(
imageUri = javaType.imageUri().map({ args0 -> args0 }).orElse(null),
s3Bucket = javaType.s3Bucket().map({ args0 -> args0 }).orElse(null),
s3Key = javaType.s3Key().map({ args0 -> args0 }).orElse(null),
s3ObjectVersion = javaType.s3ObjectVersion().map({ args0 -> args0 }).orElse(null),
sourceKmsKeyArn = javaType.sourceKmsKeyArn().map({ args0 -> args0 }).orElse(null),
zipFile = javaType.zipFile().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy