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 staticFilesBucket,
java.lang.String codeBucket,
java.lang.String lambdaName,
java.lang.String bucketPrefix,
int keepAliveCount,
java.time.Duration keepAliveInterval,
java.time.Duration keepAliveSleep,
VpcConfig vpcConfig)
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 name of the lambda function containing the handler code;
|
java.lang.String |
component11()
Prefix prepended to the names of the buckets created by Osiris. This can be used to make them unique
in the event of a name clash. Bucket names must be globally unique so two
Osiris applications with the same names would have the same bucket names if no prefix were used.
|
int |
component12()
The number of lambda instances that should be kept alive.
|
java.time.Duration |
component13()
The time between each set of keep-alive messages.
|
java.time.Duration |
component14()
The time each lambda instance should sleep after receiving a keep-alive request.
|
VpcConfig |
component15()
Configuration of any VPC (Virtual Private Cloud) access required by the application.
|
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()
The bucket from which static files are served;
|
java.lang.String |
component9()
The bucket to which code artifacts are uploaded;
|
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 staticFilesBucket,
java.lang.String codeBucket,
java.lang.String lambdaName,
java.lang.String bucketPrefix,
int keepAliveCount,
java.time.Duration keepAliveInterval,
java.time.Duration keepAliveSleep,
VpcConfig vpcConfig)
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 |
getBucketPrefix()
Prefix prepended to the names of the buckets created by Osiris. This can be used to make them unique
in the event of a name clash. Bucket names must be globally unique so two
Osiris applications with the same names would have the same bucket names if no prefix were used.
|
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<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 staticFilesBucket,
@Nullable
java.lang.String codeBucket,
@Nullable
java.lang.String lambdaName,
@Nullable
java.lang.String bucketPrefix,
int keepAliveCount,
@NotNull
java.time.Duration keepAliveInterval,
@NotNull
java.time.Duration keepAliveSleep,
@Nullable
VpcConfig vpcConfig)
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.
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.bucketPrefix - Prefix prepended to the names of the buckets created by Osiris. This can be used to make them unique in the event of a name clash. Bucket names must be globally unique so two Osiris applications with the same names would have the same bucket names if no prefix were used.
If this is specified the bucket names will be something like
my-prefix-my-app-static-files
If no prefix is specified the names will follow the pattern:
my-app-static-files
keepAliveCount - The number of lambda instances that should be kept alive.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.
@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 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.
@Nullable public java.lang.String getBucketPrefix()
Prefix prepended to the names of the buckets created by Osiris. This can be used to make them unique in the event of a name clash. Bucket names must be globally unique so two Osiris applications with the same names would have the same bucket names if no prefix were used.
If this is specified the bucket names will be something like
my-prefix-my-app-static-files
If no prefix is specified the names will follow the pattern:
my-app-static-files
public int getKeepAliveCount()
The number of lambda instances that should be kept alive.
@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 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()
The bucket from which static files are served;
if this is not specified a bucket is created.
@Nullable public java.lang.String component9()
The bucket to which code artifacts are uploaded;
if this is not specified a bucket is created.
@Nullable public java.lang.String component10()
The name of the lambda function containing the handler code;
if this is not specified a name is generated.
@Nullable public java.lang.String component11()
Prefix prepended to the names of the buckets created by Osiris. This can be used to make them unique in the event of a name clash. Bucket names must be globally unique so two Osiris applications with the same names would have the same bucket names if no prefix were used.
If this is specified the bucket names will be something like
my-prefix-my-app-static-files
If no prefix is specified the names will follow the pattern:
my-app-static-files
public int component12()
The number of lambda instances that should be kept alive.
@NotNull public java.time.Duration component13()
The time between each set of keep-alive messages.
This should not normally need to be changed.
@NotNull public java.time.Duration component14()
The time each lambda instance should sleep after receiving a keep-alive request.
This should not normally need to be changed.
@Nullable public VpcConfig component15()
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 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 staticFilesBucket, @Nullable java.lang.String codeBucket, @Nullable java.lang.String lambdaName, @Nullable java.lang.String bucketPrefix, int keepAliveCount, @NotNull java.time.Duration keepAliveInterval, @NotNull java.time.Duration keepAliveSleep, @Nullable VpcConfig vpcConfig)
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)