All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awsconstructs.services.lambdas3.LambdaToS3 Maven / Gradle / Ivy

Go to download

CDK constructs for defining an interaction between an AWS Lambda function and an Amazon S3 bucket.

There is a newer version: 2.74.0
Show newest version
package software.amazon.awsconstructs.services.lambdas3;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-11T02:33:32.932Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.lambdas3.$Module.class, fqn = "@aws-solutions-constructs/aws-lambda-s3.LambdaToS3")
public class LambdaToS3 extends software.constructs.Construct {

    protected LambdaToS3(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected LambdaToS3(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param scope 
  • represents the scope for all the resources.
This parameter is required. * @param id
  • this is a a scope-unique id.
This parameter is required. * @param props
  • user provided props for the construct.
This parameter is required. */ public LambdaToS3(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awsconstructs.services.lambdas3.LambdaToS3Props props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.Function getLambdaFunction() { return software.amazon.jsii.Kernel.get(this, "lambdaFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Function.class)); } public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.s3.IBucket getS3BucketInterface() { return software.amazon.jsii.Kernel.get(this, "s3BucketInterface", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.IBucket.class)); } public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.Bucket getS3Bucket() { return software.amazon.jsii.Kernel.get(this, "s3Bucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.Bucket.class)); } public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.Bucket getS3LoggingBucket() { return software.amazon.jsii.Kernel.get(this, "s3LoggingBucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.Bucket.class)); } public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getVpc() { return software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class)); } /** * A fluent builder for {@link software.amazon.awsconstructs.services.lambdas3.LambdaToS3}. */ public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope
  • represents the scope for all the resources.
This parameter is required. * @param id
  • this is a a scope-unique id.
This parameter is required. */ public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final software.amazon.awsconstructs.services.lambdas3.LambdaToS3Props.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.awsconstructs.services.lambdas3.LambdaToS3Props.Builder(); } /** * Optional Name for the Lambda function environment variable set to the name of the bucket. *

* Default: - S3_BUCKET_NAME *

* @return {@code this} * @param bucketEnvironmentVariableName Optional Name for the Lambda function environment variable set to the name of the bucket. This parameter is required. */ public Builder bucketEnvironmentVariableName(final java.lang.String bucketEnvironmentVariableName) { this.props.bucketEnvironmentVariableName(bucketEnvironmentVariableName); return this; } /** * Optional bucket permissions to grant to the Lambda function. *

* One or more of the following may be specified: "Delete", "Put", "Read", "ReadWrite", "Write". *

* Default: - Read/write access is given to the Lambda function if no value is specified. *

* @return {@code this} * @param bucketPermissions Optional bucket permissions to grant to the Lambda function. This parameter is required. */ public Builder bucketPermissions(final java.util.List bucketPermissions) { this.props.bucketPermissions(bucketPermissions); return this; } /** * Optional user provided props to override the default props for the S3 Bucket. *

* Default: - Default props are used *

* @return {@code this} * @param bucketProps Optional user provided props to override the default props for the S3 Bucket. This parameter is required. */ public Builder bucketProps(final software.amazon.awscdk.services.s3.BucketProps bucketProps) { this.props.bucketProps(bucketProps); return this; } /** * Whether to deploy a new VPC. *

* Default: - false *

* @return {@code this} * @param deployVpc Whether to deploy a new VPC. This parameter is required. */ public Builder deployVpc(final java.lang.Boolean deployVpc) { this.props.deployVpc(deployVpc); return this; } /** * Existing instance of S3 Bucket object, providing both this and bucketProps will cause an error. *

* Default: - None *

* @return {@code this} * @param existingBucketObj Existing instance of S3 Bucket object, providing both this and bucketProps will cause an error. This parameter is required. */ public Builder existingBucketObj(final software.amazon.awscdk.services.s3.IBucket existingBucketObj) { this.props.existingBucketObj(existingBucketObj); return this; } /** * Existing instance of Lambda Function object, providing both this and lambdaFunctionProps will cause an error. *

* Default: - None *

* @return {@code this} * @param existingLambdaObj Existing instance of Lambda Function object, providing both this and lambdaFunctionProps will cause an error. This parameter is required. */ public Builder existingLambdaObj(final software.amazon.awscdk.services.lambda.Function existingLambdaObj) { this.props.existingLambdaObj(existingLambdaObj); return this; } /** * An existing VPC for the construct to use (construct will NOT create a new VPC in this case). *

* @return {@code this} * @param existingVpc An existing VPC for the construct to use (construct will NOT create a new VPC in this case). This parameter is required. */ public Builder existingVpc(final software.amazon.awscdk.services.ec2.IVpc existingVpc) { this.props.existingVpc(existingVpc); return this; } /** * Optional user provided props to override the default props for the Lambda function. *

* Default: - Default properties are used. *

* @return {@code this} * @param lambdaFunctionProps Optional user provided props to override the default props for the Lambda function. This parameter is required. */ public Builder lambdaFunctionProps(final software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) { this.props.lambdaFunctionProps(lambdaFunctionProps); return this; } /** * Optional user provided props to override the default props for the S3 Logging Bucket. *

* Default: - Default props are used *

* @return {@code this} * @param loggingBucketProps Optional user provided props to override the default props for the S3 Logging Bucket. This parameter is required. */ public Builder loggingBucketProps(final software.amazon.awscdk.services.s3.BucketProps loggingBucketProps) { this.props.loggingBucketProps(loggingBucketProps); return this; } /** * Whether to turn on Access Logs for the S3 bucket with the associated storage costs. *

* Enabling Access Logging is a best practice. *

* Default: - true *

* @return {@code this} * @param logS3AccessLogs Whether to turn on Access Logs for the S3 bucket with the associated storage costs. This parameter is required. */ public Builder logS3AccessLogs(final java.lang.Boolean logS3AccessLogs) { this.props.logS3AccessLogs(logS3AccessLogs); return this; } /** * Properties to override default properties if deployVpc is true. *

* @return {@code this} * @param vpcProps Properties to override default properties if deployVpc is true. This parameter is required. */ public Builder vpcProps(final software.amazon.awscdk.services.ec2.VpcProps vpcProps) { this.props.vpcProps(vpcProps); return this; } /** * @return a newly built instance of {@link software.amazon.awsconstructs.services.lambdas3.LambdaToS3}. */ @Override public software.amazon.awsconstructs.services.lambdas3.LambdaToS3 build() { return new software.amazon.awsconstructs.services.lambdas3.LambdaToS3( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy