Interface BucketOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
BucketOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:03.815Z") @Stability(Stable) public interface BucketOptions extends software.amazon.jsii.JsiiSerializable
Optional parameters for creating code using bucket.

Example:

 import software.amazon.awscdk.services.kms.Key;
 import software.amazon.awscdk.services.s3.*;
 Key key;
 Bucket bucket = new Bucket(this, "Bucket");
 Map<String, Key> options = Map.of(
         "sourceKMSKey", key);
 Function fnBucket = Function.Builder.create(this, "myFunction2")
         .runtime(Runtime.NODEJS_LATEST)
         .handler("index.handler")
         .code(Code.fromBucketV2(bucket, "python-lambda-handler.zip", options))
         .build();
 
  • Method Details

    • getObjectVersion

      @Stability(Stable) @Nullable default String getObjectVersion()
      Optional S3 object version.
    • getSourceKMSKey

      @Stability(Stable) @Nullable default IKey getSourceKMSKey()
      The ARN of the KMS key used to encrypt the handler code.

      Default: - the default server-side encryption with Amazon S3 managed keys(SSE-S3) key will be used.

    • builder

      @Stability(Stable) static BucketOptions.Builder builder()
      Returns:
      a BucketOptions.Builder of BucketOptions