Package com.cloudforgeci.api.core
Class Ec2ContextImpl
java.lang.Object
com.cloudforgeci.api.core.Ec2ContextImpl
- All Implemented Interfaces:
Ec2Context
Implementation of Ec2Context providing runtime information for UserData configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the EFS access point ID if EFS is available.efsId()Returns the EFS filesystem ID if EFS is available.booleanhasEfs()Returns whether EFS is available in this deployment.Returns the runtime type as a string.Returns the security profile as a string.Returns the CloudFormation stack name.
-
Constructor Details
-
Ec2ContextImpl
-
-
Method Details
-
stackName
Description copied from interface:Ec2ContextReturns the CloudFormation stack name. Used for resource naming and CloudWatch log group names.- Specified by:
stackNamein interfaceEc2Context- Returns:
- stack name (e.g., "jenkins-prod")
-
runtimeType
Description copied from interface:Ec2ContextReturns the runtime type as a string. Typically "EC2" or "FARGATE".- Specified by:
runtimeTypein interfaceEc2Context- Returns:
- runtime type in lowercase (e.g., "ec2")
-
securityProfile
Description copied from interface:Ec2ContextReturns the security profile as a string. Used for compliance-aware logging and configuration.- Specified by:
securityProfilein interfaceEc2Context- Returns:
- security profile in lowercase (e.g., "dev", "staging", "production")
-
hasEfs
public boolean hasEfs()Description copied from interface:Ec2ContextReturns whether EFS is available in this deployment. If true, applications should use EFS for storage. If false, applications should use EBS for storage.- Specified by:
hasEfsin interfaceEc2Context- Returns:
- true if EFS is configured and available
-
efsId
Description copied from interface:Ec2ContextReturns the EFS filesystem ID if EFS is available.- Specified by:
efsIdin interfaceEc2Context- Returns:
- EFS filesystem ID (e.g., "fs-12345678"), or empty if EFS is not available
-
accessPointId
Description copied from interface:Ec2ContextReturns the EFS access point ID if EFS is available.- Specified by:
accessPointIdin interfaceEc2Context- Returns:
- EFS access point ID (e.g., "fsap-12345678"), or empty if EFS is not available
-