software.amazon.awsconstructs.services.lambdaelasticachememcached.LambdaToElasticachememcached Maven / Gradle / Ivy
Show all versions of lambdaelasticachememcached Show documentation
package software.amazon.awsconstructs.services.lambdaelasticachememcached;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.106.0 (build e852934)", date = "2024-12-24T18:32:46.442Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.lambdaelasticachememcached.$Module.class, fqn = "@aws-solutions-constructs/aws-lambda-elasticachememcached.LambdaToElasticachememcached")
public class LambdaToElasticachememcached extends software.constructs.Construct {
protected LambdaToElasticachememcached(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected LambdaToElasticachememcached(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 LambdaToElasticachememcached(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.lambdaelasticachememcached.LambdaToElasticachememcachedProps 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.elasticache.CfnCacheCluster getCache() {
return software.amazon.jsii.Kernel.get(this, "cache", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.elasticache.CfnCacheCluster.class));
}
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.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.lambdaelasticachememcached.LambdaToElasticachememcached}.
*/
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.lambdaelasticachememcached.LambdaToElasticachememcachedProps.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.lambdaelasticachememcached.LambdaToElasticachememcachedProps.Builder();
}
/**
* Optional Name for the Lambda function environment variable set to the cache endpoint.
*
* Default: - CACHE_ENDPOINT
*
* @return {@code this}
* @param cacheEndpointEnvironmentVariableName Optional Name for the Lambda function environment variable set to the cache endpoint. This parameter is required.
*/
public Builder cacheEndpointEnvironmentVariableName(final java.lang.String cacheEndpointEnvironmentVariableName) {
this.props.cacheEndpointEnvironmentVariableName(cacheEndpointEnvironmentVariableName);
return this;
}
/**
* Optional user provided props to override the default props for the Elasticache cache.
*
* Providing both this and existingCache
will cause an error. If you provide this,
* you must provide the associated VPC in existingVpc.
*
* Default: - Default properties are used (core/lib/elasticacahe-defaults.ts)
*
* @return {@code this}
* @param cacheProps Optional user provided props to override the default props for the Elasticache cache. This parameter is required.
*/
public Builder cacheProps(final java.lang.Object cacheProps) {
this.props.cacheProps(cacheProps);
return this;
}
/**
* Existing instance of Elasticache Cluster object, providing both this and cacheProps
will cause an error.
*
* Default: - none
*
* @return {@code this}
* @param existingCache Existing instance of Elasticache Cluster object, providing both this and cacheProps
will cause an error. This parameter is required.
*/
public Builder existingCache(final software.amazon.awscdk.services.elasticache.CfnCacheCluster existingCache) {
this.props.existingCache(existingCache);
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).
*
* Default: - none
*
* @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;
}
/**
* Properties to override default properties if deployVpc is true.
*
* Default: - DefaultIsolatedVpcProps() in vpc-defaults.ts
*
* @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.lambdaelasticachememcached.LambdaToElasticachememcached}.
*/
@Override
public software.amazon.awsconstructs.services.lambdaelasticachememcached.LambdaToElasticachememcached build() {
return new software.amazon.awsconstructs.services.lambdaelasticachememcached.LambdaToElasticachememcached(
this.scope,
this.id,
this.props.build()
);
}
}
}