Class FunctionCode
- java.lang.Object
-
- com.amazonaws.services.lambda.model.FunctionCode
-
- All Implemented Interfaces:
Serializable,Cloneable
public class FunctionCode extends Object implements Serializable, Cloneable
The code for the Lambda function.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FunctionCode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionCodeclone()booleanequals(Object obj)StringgetS3Bucket()Amazon S3 bucket name where the .zip file containing your deployment package is stored.StringgetS3Key()The Amazon S3 object (the deployment package) key name you want to upload.StringgetS3ObjectVersion()The Amazon S3 object (the deployment package) version you want to upload.ByteBuffergetZipFile()A zip file containing your deployment package.inthashCode()voidsetS3Bucket(String s3Bucket)Amazon S3 bucket name where the .zip file containing your deployment package is stored.voidsetS3Key(String s3Key)The Amazon S3 object (the deployment package) key name you want to upload.voidsetS3ObjectVersion(String s3ObjectVersion)The Amazon S3 object (the deployment package) version you want to upload.voidsetZipFile(ByteBuffer zipFile)A zip file containing your deployment package.StringtoString()Returns a string representation of this object; useful for testing and debugging.FunctionCodewithS3Bucket(String s3Bucket)Amazon S3 bucket name where the .zip file containing your deployment package is stored.FunctionCodewithS3Key(String s3Key)The Amazon S3 object (the deployment package) key name you want to upload.FunctionCodewithS3ObjectVersion(String s3ObjectVersion)The Amazon S3 object (the deployment package) version you want to upload.FunctionCodewithZipFile(ByteBuffer zipFile)A zip file containing your deployment package.
-
-
-
Method Detail
-
setZipFile
public void setZipFile(ByteBuffer zipFile)
A zip file containing your deployment package. If you are using the API directly, the zip file must be base64-encoded (if you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you). For more information about creating a .zip file, go to Execution Permissions in the AWS Lambda Developer Guide.
AWS SDK for Java performs a Base64 encoding on this field before sending this request to AWS service by default. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
- Parameters:
zipFile- A zip file containing your deployment package. If you are using the API directly, the zip file must be base64-encoded (if you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you). For more information about creating a .zip file, go to Execution Permissions in the AWS Lambda Developer Guide.
-
getZipFile
public ByteBuffer getZipFile()
A zip file containing your deployment package. If you are using the API directly, the zip file must be base64-encoded (if you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you). For more information about creating a .zip file, go to Execution Permissions in the AWS Lambda Developer Guide.
ByteBuffers are stateful. Calling theirgetmethods changes theirposition. We recommend usingByteBuffer.asReadOnlyBuffer()to create a read-only view of the buffer with an independentposition, and callinggetmethods on this rather than directly on the returnedByteBuffer. Doing so will ensure that anyone else using theByteBufferwill not be affected by changes to theposition.- Returns:
- A zip file containing your deployment package. If you are using the API directly, the zip file must be base64-encoded (if you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you). For more information about creating a .zip file, go to Execution Permissions in the AWS Lambda Developer Guide.
-
withZipFile
public FunctionCode withZipFile(ByteBuffer zipFile)
A zip file containing your deployment package. If you are using the API directly, the zip file must be base64-encoded (if you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you). For more information about creating a .zip file, go to Execution Permissions in the AWS Lambda Developer Guide.
- Parameters:
zipFile- A zip file containing your deployment package. If you are using the API directly, the zip file must be base64-encoded (if you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you). For more information about creating a .zip file, go to Execution Permissions in the AWS Lambda Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setS3Bucket
public void setS3Bucket(String s3Bucket)
Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS region where you are creating the Lambda function.
- Parameters:
s3Bucket- Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS region where you are creating the Lambda function.
-
getS3Bucket
public String getS3Bucket()
Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS region where you are creating the Lambda function.
- Returns:
- Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS region where you are creating the Lambda function.
-
withS3Bucket
public FunctionCode withS3Bucket(String s3Bucket)
Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS region where you are creating the Lambda function.
- Parameters:
s3Bucket- Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS region where you are creating the Lambda function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setS3Key
public void setS3Key(String s3Key)
The Amazon S3 object (the deployment package) key name you want to upload.
- Parameters:
s3Key- The Amazon S3 object (the deployment package) key name you want to upload.
-
getS3Key
public String getS3Key()
The Amazon S3 object (the deployment package) key name you want to upload.
- Returns:
- The Amazon S3 object (the deployment package) key name you want to upload.
-
withS3Key
public FunctionCode withS3Key(String s3Key)
The Amazon S3 object (the deployment package) key name you want to upload.
- Parameters:
s3Key- The Amazon S3 object (the deployment package) key name you want to upload.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setS3ObjectVersion
public void setS3ObjectVersion(String s3ObjectVersion)
The Amazon S3 object (the deployment package) version you want to upload.
- Parameters:
s3ObjectVersion- The Amazon S3 object (the deployment package) version you want to upload.
-
getS3ObjectVersion
public String getS3ObjectVersion()
The Amazon S3 object (the deployment package) version you want to upload.
- Returns:
- The Amazon S3 object (the deployment package) version you want to upload.
-
withS3ObjectVersion
public FunctionCode withS3ObjectVersion(String s3ObjectVersion)
The Amazon S3 object (the deployment package) version you want to upload.
- Parameters:
s3ObjectVersion- The Amazon S3 object (the deployment package) version you want to upload.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public FunctionCode clone()
-
-