public class ApplicationConfig
The configuration of a deployed application.
The values in this class control how the application is deployed to AWS.
| Constructor and Description |
|---|
ApplicationConfig(java.lang.String applicationName,
java.lang.String applicationDescription,
int lambdaMemorySizeMb,
java.time.Duration lambdaTimeout,
java.util.Map<java.lang.String,java.lang.String> environmentVariables,
java.util.List<ws.osiris.aws.Stage> stages,
AuthConfig authConfig,
java.lang.String bucketSuffix,
java.lang.String staticFilesBucket,
java.lang.String codeBucket,
java.lang.String lambdaName,
int keepAliveCount,
java.util.List<java.lang.String> layers,
java.time.Duration keepAliveInterval,
java.time.Duration keepAliveSleep,
VpcConfig vpcConfig,
LambdaRuntime runtime)
The configuration of a deployed application.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
component1()
The name of the API in API Gateway and the stack in CloudFormation.
|
java.lang.String |
component10()
The bucket to which code artifacts are uploaded;
|
java.lang.String |
component11()
The name of the lambda function containing the handler code;
|
int |
component12()
The number of lambda instances that should be kept alive.
|
java.util.List<java.lang.String> |
component13()
ARNs of the layers that should be included in the lambda function configuration.
|
java.time.Duration |
component14()
The time between each set of keep-alive messages.
|
java.time.Duration |
component15()
The time each lambda instance should sleep after receiving a keep-alive request.
|
VpcConfig |
component16()
Configuration of any VPC (Virtual Private Cloud) access required by the application.
|
LambdaRuntime |
component17()
The runtime that should be used for the Osiris lambda function.
|
java.lang.String |
component2()
A description of the application.
|
int |
component3()
The maximum memory available to the lambda containing the handler code.
|
java.time.Duration |
component4()
The maximum time the handler code can run before being terminated by AWS.
|
java.util.Map<java.lang.String,java.lang.String> |
component5()
The environment variables available to the lambda code;
|
java.util.List<ws.osiris.aws.Stage> |
component6()
The stages to which the API is deployed,
|
AuthConfig |
component7()
Configuration of any external authentication mechanism.
|
java.lang.String |
component8()
This is no longer used;
|
java.lang.String |
component9()
The bucket from which static files are served;
|
ApplicationConfig |
copy(java.lang.String applicationName,
java.lang.String applicationDescription,
int lambdaMemorySizeMb,
java.time.Duration lambdaTimeout,
java.util.Map<java.lang.String,java.lang.String> environmentVariables,
java.util.List<ws.osiris.aws.Stage> stages,
AuthConfig authConfig,
java.lang.String bucketSuffix,
java.lang.String staticFilesBucket,
java.lang.String codeBucket,
java.lang.String lambdaName,
int keepAliveCount,
java.util.List<java.lang.String> layers,
java.time.Duration keepAliveInterval,
java.time.Duration keepAliveSleep,
VpcConfig vpcConfig,
LambdaRuntime runtime)
The configuration of a deployed application.
|
boolean |
equals(java.lang.Object p) |
java.lang.String |
getApplicationDescription()
A description of the application.
|
java.lang.String |
getApplicationName()
The name of the API in API Gateway and the stack in CloudFormation.
|
AuthConfig |
getAuthConfig()
Configuration of any external authentication mechanism.
|
java.lang.String |
getBucketSuffix()
Deprecated.
|
java.lang.String |
getCodeBucket()
The bucket to which code artifacts are uploaded;
|
java.util.Map<java.lang.String,java.lang.String> |
getEnvironmentVariables()
The environment variables available to the lambda code;
|
int |
getKeepAliveCount()
The number of lambda instances that should be kept alive.
|
java.time.Duration |
getKeepAliveInterval()
The time between each set of keep-alive messages.
|
java.time.Duration |
getKeepAliveSleep()
The time each lambda instance should sleep after receiving a keep-alive request.
|
int |
getLambdaMemorySizeMb()
The maximum memory available to the lambda containing the handler code.
|
java.lang.String |
getLambdaName()
The name of the lambda function containing the handler code;
|
java.time.Duration |
getLambdaTimeout()
The maximum time the handler code can run before being terminated by AWS.
|
java.util.List<java.lang.String> |
getLayers()
ARNs of the layers that should be included in the lambda function configuration.
|
LambdaRuntime |
getRuntime()
The runtime that should be used for the Osiris lambda function.
|
java.util.List<ws.osiris.aws.Stage> |
getStages()
The stages to which the API is deployed,
|
java.lang.String |
getStaticFilesBucket()
The bucket from which static files are served;
|
VpcConfig |
getVpcConfig()
Configuration of any VPC (Virtual Private Cloud) access required by the application.
|
int |
hashCode() |
java.lang.String |
toString() |
public ApplicationConfig(@NotNull
java.lang.String applicationName,
@NotNull
java.lang.String applicationDescription,
int lambdaMemorySizeMb,
@NotNull
java.time.Duration lambdaTimeout,
@NotNull
java.util.Map<java.lang.String,java.lang.String> environmentVariables,
@NotNull
java.util.List<ws.osiris.aws.Stage> stages,
@Nullable
AuthConfig authConfig,
@Nullable
java.lang.String bucketSuffix,
@Nullable
java.lang.String staticFilesBucket,
@Nullable
java.lang.String codeBucket,
@Nullable
java.lang.String lambdaName,
int keepAliveCount,
@NotNull
java.util.List<java.lang.String> layers,
@NotNull
java.time.Duration keepAliveInterval,
@NotNull
java.time.Duration keepAliveSleep,
@Nullable
VpcConfig vpcConfig,
@NotNull
LambdaRuntime runtime)
The configuration of a deployed application.
The values in this class control how the application is deployed to AWS.
applicationName - The name of the API in API Gateway and the stack in CloudFormation.applicationDescription - A description of the application.lambdaMemorySizeMb - The maximum memory available to the lambda containing the handler code.lambdaTimeout - The maximum time the handler code can run before being terminated by AWS.environmentVariables - The environment variables available to the lambda code; used when creating components.stages - The stages to which the API is deployed, for example dev, test and prod; there must be at least one.authConfig - Configuration of any external authentication mechanism.
This is only necessary if the auth mechanism is not created as part of the same CloudFormation stack as the application. If the Cognito user pool or custom auth lambda are defined in the application stack then this property should not be set.
bucketSuffix - This is no longer used; the AWS account ID is included in generated bucket names to ensure they are unique.staticFilesBucket - The bucket from which static files are served; if this is not specified a bucket is created.codeBucket - The bucket to which code artifacts are uploaded; if this is not specified a bucket is created.lambdaName - The name of the lambda function containing the handler code; if this is not specified a name is generated.keepAliveCount - The number of lambda instances that should be kept alive.layers - ARNs of the layers that should be included in the lambda function configuration.keepAliveInterval - The time between each set of keep-alive messages.
This should not normally need to be changed.
keepAliveSleep - The time each lambda instance should sleep after receiving a keep-alive request.
This should not normally need to be changed.
vpcConfig - Configuration of any VPC (Virtual Private Cloud) access required by the application.
If the application code needs to access any AWS resources in a VPC then the VPC configuration must be specified here. This will cause the application lambda function to be created inside the VPC.
This incurs a startup penalty for the lambda function and means that application code cannot access the internet without additional configuration.
See the AWS docs for more details.
runtime - The runtime that should be used for the Osiris lambda function.
This should normally be left as the default (LambdaRuntime.Java8).
If you specify a layer that provides an alternative runtime then use LambdaRuntime.Provided.
@NotNull public java.lang.String getApplicationName()
The name of the API in API Gateway and the stack in CloudFormation.
@NotNull public java.lang.String getApplicationDescription()
A description of the application.
public int getLambdaMemorySizeMb()
The maximum memory available to the lambda containing the handler code.
@NotNull public java.time.Duration getLambdaTimeout()
The maximum time the handler code can run before being terminated by AWS.
@NotNull public java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
The environment variables available to the lambda code;
used when creating components.
@NotNull public java.util.List<ws.osiris.aws.Stage> getStages()
The stages to which the API is deployed,
for example dev, test and prod; there must be at least one.
@Nullable public AuthConfig getAuthConfig()
Configuration of any external authentication mechanism.
This is only necessary if the auth mechanism is not created as part of the same CloudFormation stack as the application. If the Cognito user pool or custom auth lambda are defined in the application stack then this property should not be set.
@Nullable public java.lang.String getBucketSuffix()
This is no longer used;
the AWS account ID is included in generated bucket names to ensure they are unique.
@Nullable public java.lang.String getStaticFilesBucket()
The bucket from which static files are served;
if this is not specified a bucket is created.
@Nullable public java.lang.String getCodeBucket()
The bucket to which code artifacts are uploaded;
if this is not specified a bucket is created.
@Nullable public java.lang.String getLambdaName()
The name of the lambda function containing the handler code;
if this is not specified a name is generated.
public int getKeepAliveCount()
The number of lambda instances that should be kept alive.
@NotNull public java.util.List<java.lang.String> getLayers()
ARNs of the layers that should be included in the lambda function configuration.
@NotNull public java.time.Duration getKeepAliveInterval()
The time between each set of keep-alive messages.
This should not normally need to be changed.
@NotNull public java.time.Duration getKeepAliveSleep()
The time each lambda instance should sleep after receiving a keep-alive request.
This should not normally need to be changed.
@Nullable public VpcConfig getVpcConfig()
Configuration of any VPC (Virtual Private Cloud) access required by the application.
If the application code needs to access any AWS resources in a VPC then the VPC configuration must be specified here. This will cause the application lambda function to be created inside the VPC.
This incurs a startup penalty for the lambda function and means that application code cannot access the internet without additional configuration.
See the AWS docs for more details.
@NotNull public LambdaRuntime getRuntime()
The runtime that should be used for the Osiris lambda function.
This should normally be left as the default (LambdaRuntime.Java8).
If you specify a layer that provides an alternative runtime then use LambdaRuntime.Provided.
@NotNull public java.lang.String component1()
The name of the API in API Gateway and the stack in CloudFormation.
@NotNull public java.lang.String component2()
A description of the application.
public int component3()
The maximum memory available to the lambda containing the handler code.
@NotNull public java.time.Duration component4()
The maximum time the handler code can run before being terminated by AWS.
@NotNull public java.util.Map<java.lang.String,java.lang.String> component5()
The environment variables available to the lambda code;
used when creating components.
@NotNull public java.util.List<ws.osiris.aws.Stage> component6()
The stages to which the API is deployed,
for example dev, test and prod; there must be at least one.
@Nullable public AuthConfig component7()
Configuration of any external authentication mechanism.
This is only necessary if the auth mechanism is not created as part of the same CloudFormation stack as the application. If the Cognito user pool or custom auth lambda are defined in the application stack then this property should not be set.
@Nullable public java.lang.String component8()
This is no longer used;
the AWS account ID is included in generated bucket names to ensure they are unique.
@Nullable public java.lang.String component9()
The bucket from which static files are served;
if this is not specified a bucket is created.
@Nullable public java.lang.String component10()
The bucket to which code artifacts are uploaded;
if this is not specified a bucket is created.
@Nullable public java.lang.String component11()
The name of the lambda function containing the handler code;
if this is not specified a name is generated.
public int component12()
The number of lambda instances that should be kept alive.
@NotNull public java.util.List<java.lang.String> component13()
ARNs of the layers that should be included in the lambda function configuration.
@NotNull public java.time.Duration component14()
The time between each set of keep-alive messages.
This should not normally need to be changed.
@NotNull public java.time.Duration component15()
The time each lambda instance should sleep after receiving a keep-alive request.
This should not normally need to be changed.
@Nullable public VpcConfig component16()
Configuration of any VPC (Virtual Private Cloud) access required by the application.
If the application code needs to access any AWS resources in a VPC then the VPC configuration must be specified here. This will cause the application lambda function to be created inside the VPC.
This incurs a startup penalty for the lambda function and means that application code cannot access the internet without additional configuration.
See the AWS docs for more details.
@NotNull public LambdaRuntime component17()
The runtime that should be used for the Osiris lambda function.
This should normally be left as the default (LambdaRuntime.Java8).
If you specify a layer that provides an alternative runtime then use LambdaRuntime.Provided.
@NotNull public ApplicationConfig copy(@NotNull java.lang.String applicationName, @NotNull java.lang.String applicationDescription, int lambdaMemorySizeMb, @NotNull java.time.Duration lambdaTimeout, @NotNull java.util.Map<java.lang.String,java.lang.String> environmentVariables, @NotNull java.util.List<ws.osiris.aws.Stage> stages, @Nullable AuthConfig authConfig, @Nullable java.lang.String bucketSuffix, @Nullable java.lang.String staticFilesBucket, @Nullable java.lang.String codeBucket, @Nullable java.lang.String lambdaName, int keepAliveCount, @NotNull java.util.List<java.lang.String> layers, @NotNull java.time.Duration keepAliveInterval, @NotNull java.time.Duration keepAliveSleep, @Nullable VpcConfig vpcConfig, @NotNull LambdaRuntime runtime)
The configuration of a deployed application.
The values in this class control how the application is deployed to AWS.
@NotNull public java.lang.String toString()
public int hashCode()
public boolean equals(@Nullable
java.lang.Object p)