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,
java.util.Set<java.lang.String> binaryMimeTypes,
int keepAliveCount,
java.time.Duration keepAliveInterval,
java.time.Duration keepAliveSleep)
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 unique across all accounts in a region so two
Osiris applications with the same names would have the same bucket names if no prefix were used.
|
java.util.Set<java.lang.String> |
component12()
The MIME types that are treated by API Gateway as binary;
|
int |
component13()
The number of lambda instances that should be kept alive.
|
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.
|
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,
java.util.Set<java.lang.String> binaryMimeTypes,
int keepAliveCount,
java.time.Duration keepAliveInterval,
java.time.Duration keepAliveSleep)
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.util.Set<java.lang.String> |
getBinaryMimeTypes()
The MIME types that are treated by API Gateway as binary;
|
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 unique across all accounts in a region 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;
|
int |
hashCode() |
java.lang.String |
toString() |
public 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,
java.util.Set<java.lang.String> binaryMimeTypes,
int keepAliveCount,
java.time.Duration keepAliveInterval,
java.time.Duration keepAliveSleep)
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 unique across all accounts in a region 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
binaryMimeTypes - The MIME types that are treated by API Gateway as binary; these are encoded in the JSON using Base64.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.
public java.lang.String getApplicationName()
The name of the API in API Gateway and the stack in CloudFormation.
public java.lang.String getApplicationDescription()
A description of the application.
public int getLambdaMemorySizeMb()
The maximum memory available to the lambda containing the handler code.
public java.time.Duration getLambdaTimeout()
The maximum time the handler code can run before being terminated by AWS.
public java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
The environment variables available to the lambda code;
used when creating components.
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.
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.
public java.lang.String getStaticFilesBucket()
The bucket from which static files are served;
if this is not specified a bucket is created.
public java.lang.String getCodeBucket()
The bucket to which code artifacts are uploaded;
if this is not specified a bucket is created.
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 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 unique across all accounts in a region 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 java.util.Set<java.lang.String> getBinaryMimeTypes()
The MIME types that are treated by API Gateway as binary;
these are encoded in the JSON using Base64.
public int getKeepAliveCount()
The number of lambda instances that should be kept alive.
public java.time.Duration getKeepAliveInterval()
The time between each set of keep-alive messages.
This should not normally need to be changed.
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.
public java.lang.String component1()
The name of the API in API Gateway and the stack in CloudFormation.
public java.lang.String component2()
A description of the application.
public int component3()
The maximum memory available to the lambda containing the handler code.
public java.time.Duration component4()
The maximum time the handler code can run before being terminated by AWS.
public java.util.Map<java.lang.String,java.lang.String> component5()
The environment variables available to the lambda code;
used when creating components.
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.
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.
public java.lang.String component8()
The bucket from which static files are served;
if this is not specified a bucket is created.
public java.lang.String component9()
The bucket to which code artifacts are uploaded;
if this is not specified a bucket is created.
public java.lang.String component10()
The name of the lambda function containing the handler code;
if this is not specified a name is generated.
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 unique across all accounts in a region 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 java.util.Set<java.lang.String> component12()
The MIME types that are treated by API Gateway as binary;
these are encoded in the JSON using Base64.
public int component13()
The number of lambda instances that should be kept alive.
public java.time.Duration component14()
The time between each set of keep-alive messages.
This should not normally need to be changed.
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.
public 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, java.util.Set<java.lang.String> binaryMimeTypes, int keepAliveCount, java.time.Duration keepAliveInterval, java.time.Duration keepAliveSleep)
The configuration of a deployed application.
The values in this class control how the application is deployed to AWS.
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)