Skip to content

Enums

ActionType

Bases: Enum

Enumeration of AWS CodePipeline action types supported in the MARE ecosystem.

This enum defines the various AWS service action types that can be used within CodePipeline stages for CI/CD workflows. Each enum value corresponds to a specific AWS service integration that can be configured as a pipeline action.

The enum provides both the action type names (for programmatic use) and their corresponding AWS service identifiers (as string values) used in CodePipeline action configurations.

Enum members:

Name Value Description
S3 s3 Amazon S3 actions (source/deploy artifacts)
CODEBUILD codebuild AWS CodeBuild actions (build/test projects)
ECS ecs Amazon Elastic Container Service actions (container deployments)
CLOUDFORMATION cloudformation AWS CloudFormation actions (infrastructure deployments)
CODE_COMMIT codecommit AWS CodeCommit actions (source code repositories)
Source code in mare_aws_common_lib/enums/action_type_enum.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
class ActionType(Enum):
    """
    Enumeration of AWS CodePipeline action types supported in the MARE ecosystem.

    This enum defines the various AWS service action types that can be used within
    CodePipeline stages for CI/CD workflows. Each enum value corresponds to a specific
    AWS service integration that can be configured as a pipeline action.

    The enum provides both the action type names (for programmatic use) and their
    corresponding AWS service identifiers (as string values) used in CodePipeline
    action configurations.

    **Enum members:**

    | Name             | Value            | Description                                                      |
    |------------------|------------------|------------------------------------------------------------------|
    | `S3`             | `s3`             | Amazon S3 actions (source/deploy artifacts)                      |
    | `CODEBUILD`      | `codebuild`      | AWS CodeBuild actions (build/test projects)                      |
    | `ECS`            | `ecs`            | Amazon Elastic Container Service actions (container deployments) |
    | `CLOUDFORMATION` | `cloudformation` | AWS CloudFormation actions (infrastructure deployments)          |
    | `CODE_COMMIT`    | `codecommit`     | AWS CodeCommit  actions (source code repositories)               |

    """
    S3 = "s3"
    CODEBUILD = "codebuild"
    ECS = "ecs"
    CLOUDFORMATION = "cloudformation"
    CODE_COMMIT = "codecommit"

    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available action type names.

        Returns the enum member names (not values) as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of action type names in uppercase format
                (e.g., ['S3', 'CODEBUILD', 'ECS', 'CLOUDFORMATION', 'CODE_COMMIT'])

        Note:
            This method returns the enum names (uppercase), not the values (lowercase).
            To get the actual string values used by AWS APIs, access the .value attribute
            of individual enum members.
        """
        return [action_type.name for action_type in cls]

list() classmethod

Get a list of all available action type names.

Returns the enum member names (not values) as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of action type names in uppercase format (e.g., ['S3', 'CODEBUILD', 'ECS', 'CLOUDFORMATION', 'CODE_COMMIT'])

Note

This method returns the enum names (uppercase), not the values (lowercase). To get the actual string values used by AWS APIs, access the .value attribute of individual enum members.

Source code in mare_aws_common_lib/enums/action_type_enum.py
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available action type names.

    Returns the enum member names (not values) as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of action type names in uppercase format
            (e.g., ['S3', 'CODEBUILD', 'ECS', 'CLOUDFORMATION', 'CODE_COMMIT'])

    Note:
        This method returns the enum names (uppercase), not the values (lowercase).
        To get the actual string values used by AWS APIs, access the .value attribute
        of individual enum members.
    """
    return [action_type.name for action_type in cls]

AWSResourceNameLength

Bases: Enum

Enumeration of maximum name length constraints for AWS resources.

This enum defines the character limits imposed by AWS services for resource names. These limits are enforced by AWS APIs and must be respected when programmatically generating resource names to avoid deployment failures.

The enum is used by the ResourceNaming utility class to automatically truncate names that exceed service limits while preserving uniqueness through hash suffixes.

Enum members:

Name Value Service Context
CODEBUILD_PROJECT 255 CodeBuild project names
CODEBUILD_PIPELINE_PROJECT 128 CodeBuild projects in pipelines
ECR_REPOSITORY 256 Elastic Container Registry repos
EVENTS_RULE 64 EventBridge rule names
ROLE 64 IAM role names
S3_BUCKET 63 S3 bucket names (globally unique)
RDS_INSTANCE 63 RDS database instance identifiers
KMS_ALIAS 63 KMS key alias names
ACTION 100 CodePipeline action names
ARTIFACT 100 CodePipeline artifact names
SECRET 512 AWS Secrets Manager secret names
SEC_GROUP 255 EC2 security group names
ECS 255 ECS service and cluster names
ALB 32 Application Load Balancer names
WEB_ACL 128 WAF Web ACL names
METRIC 255 CloudWatch metric names
SHIELD 128 AWS Shield protection names
DYN_TABLE 255 DynamoDB table names
CFN_RESOURCE 256 CloudFormation logical IDs
EFS 64 Elastic File System names
SIGNING_PRFILE 64 AWS Signer Signing Profile name
Usage

These values are typically used with ResourceNaming.get_name_for_resource() to ensure generated names comply with AWS service limitations.

Note

These limits are based on AWS service documentation and may change as AWS updates their services. Always verify against current AWS documentation for the most up-to-date constraints.

Source code in mare_aws_common_lib/enums/aws_resource_name_length_enum.py
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
class AWSResourceNameLength(Enum):
    """
    Enumeration of maximum name length constraints for AWS resources.

    This enum defines the character limits imposed by AWS services for resource names.
    These limits are enforced by AWS APIs and must be respected when programmatically
    generating resource names to avoid deployment failures.

    The enum is used by the ResourceNaming utility class to automatically truncate
    names that exceed service limits while preserving uniqueness through hash suffixes.

    **Enum members:**

    | Name                       | Value | Service Context                    |
    |----------------------------|-------|------------------------------------|
    | CODEBUILD_PROJECT          | 255   | CodeBuild project names            |
    | CODEBUILD_PIPELINE_PROJECT | 128   | CodeBuild projects in pipelines    |
    | ECR_REPOSITORY             | 256   | Elastic Container Registry repos   |
    | EVENTS_RULE                | 64    | EventBridge rule names             |
    | ROLE                       | 64    | IAM role names                     |
    | S3_BUCKET                  | 63    | S3 bucket names (globally unique)  |
    | RDS_INSTANCE               | 63    | RDS database instance identifiers  |
    | KMS_ALIAS                  | 63    | KMS key alias names                |
    | ACTION                     | 100   | CodePipeline action names          |
    | ARTIFACT                   | 100   | CodePipeline artifact names        |
    | SECRET                     | 512   | AWS Secrets Manager secret names   |
    | SEC_GROUP                  | 255   | EC2 security group names           |
    | ECS                        | 255   | ECS service and cluster names      |
    | ALB                        | 32    | Application Load Balancer names    |
    | WEB_ACL                    | 128   | WAF Web ACL names                  |
    | METRIC                     | 255   | CloudWatch metric names            |
    | SHIELD                     | 128   | AWS Shield protection names        |
    | DYN_TABLE                  | 255   | DynamoDB table names               |
    | CFN_RESOURCE               | 256   | CloudFormation logical IDs         |
    | EFS                        | 64    | Elastic File System names          |
    | SIGNING_PRFILE             | 64    | AWS Signer Signing Profile name    |

    Usage:
        These values are typically used with ResourceNaming.get_name_for_resource()
        to ensure generated names comply with AWS service limitations.

    Note:
        These limits are based on AWS service documentation and may change as AWS
        updates their services. Always verify against current AWS documentation
        for the most up-to-date constraints.
    """
    CODEBUILD_PROJECT = 255
    CODEBUILD_PIPELINE_PROJECT = 128
    ECR_REPOSITORY = 256
    EVENTS_RULE = 64 # EventBridge rules
    ROLE = 64  # IAM roles
    S3_BUCKET = 63
    RDS_INSTANCE = 63
    KMS_ALIAS = 63
    ACTION = 100 # Codepipeline actions
    ARTIFACT = 100
    SECRET = 512
    SEC_GROUP = 255
    ECS = 255 # ecs service name and cluster name
    ALB = 32
    WEB_ACL = 128
    METRIC = 255
    SHIELD = 128
    DYN_TABLE = 255
    CFN_RESOURCE = 256
    EFS = 64
    SIGNING_PROFILE = 64

AWSResourceType

Bases: Enum

Enumeration of AWS resource types used for naming and identification purposes.

This enum defines the supported AWS resource types that can be used with the ResourceNaming utility class and AbstractAWSResourceBuilder implementations. Each resource type corresponds to a specific AWS service and is used for generating consistent resource names and CloudFormation logical IDs.

Enum members:

Name Value AWS Service
RDS rds Relational Database Service
S3 s3 Simple Storage Service
ECR ecr Elastic Container Registry
ECS ecs Elastic Container Service
EFS efs Elastic File System
ROUTE53 route53 Route 53 DNS Service
CLOUDFRONT cloudfront CloudFront CDN
CODEBUILD codebuild CodeBuild CI/CD Service
CODEPIPELINE codepipeline CodePipeline CI/CD Service
WAF waf Web Application Firewall
SHIELD shield DDoS Protection Service
SECRET secret Secrets Manager
DYNAMODB dynamodb DynamoDB NoSQL Database
CFN_RESOURCE cfn_resource CloudFormation Resources
LAMBDA lambda Lambda Serverless Functions
SNS_TOPIC topic Simple Notification Service
SG sg EC2 Security Groups
DATASYNC datasync DataSync Transfer Service
KMS kms Key Management Service
SIGNER signer AWS Signer Service
Usage

These resource types are used with ResourceNaming utilities and builder classes to ensure consistent naming across AWS resources and proper CloudFormation logical ID generation.

Source code in mare_aws_common_lib/enums/aws_resource_type_enum.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
class AWSResourceType(Enum):
    """
    Enumeration of AWS resource types used for naming and identification purposes.

    This enum defines the supported AWS resource types that can be used with the
    ResourceNaming utility class and AbstractAWSResourceBuilder implementations.
    Each resource type corresponds to a specific AWS service and is used for
    generating consistent resource names and CloudFormation logical IDs.

    **Enum members:**

    | Name          | Value         | AWS Service                      |
    |---------------|---------------|----------------------------------|
    | RDS           | rds           | Relational Database Service      |
    | S3            | s3            | Simple Storage Service           |
    | ECR           | ecr           | Elastic Container Registry       |
    | ECS           | ecs           | Elastic Container Service        |
    | EFS           | efs           | Elastic File System              |
    | ROUTE53       | route53       | Route 53 DNS Service             |
    | CLOUDFRONT    | cloudfront    | CloudFront CDN                   |
    | CODEBUILD     | codebuild     | CodeBuild CI/CD Service          |
    | CODEPIPELINE  | codepipeline  | CodePipeline CI/CD Service       |
    | WAF           | waf           | Web Application Firewall         |
    | SHIELD        | shield        | DDoS Protection Service          |
    | SECRET        | secret        | Secrets Manager                  |
    | DYNAMODB      | dynamodb      | DynamoDB NoSQL Database          |
    | CFN_RESOURCE  | cfn_resource  | CloudFormation Resources         |
    | LAMBDA        | lambda        | Lambda Serverless Functions      |
    | SNS_TOPIC     | topic         | Simple Notification Service      |
    | SG            | sg            | EC2 Security Groups              |
    | DATASYNC      | datasync      | DataSync Transfer Service        |
    | KMS           | kms           | Key Management Service           |
    | SIGNER        | signer        | AWS Signer Service               |

    Usage:
        These resource types are used with ResourceNaming utilities and builder classes
        to ensure consistent naming across AWS resources and proper CloudFormation
        logical ID generation.
    """
    RDS = "rds"
    S3 = "s3"
    ECR = "ecr"
    ECS = "ecs"
    EFS = "efs"
    ROUTE53 = "route53"
    CLOUDFRONT = "cloudfront"
    CODEBUILD = "codebuild"
    CODEPIPELINE = "codepipeline"
    WAF = "waf"
    SHIELD = "shield"
    SECRET = "secret"
    DYNAMODB = "dynamodb"
    CFN_RESOURCE = "cfn_resource"
    LAMBDA = "lambda"
    SNS_TOPIC = "topic"
    SG = "sg"
    DATASYNC = "datasync"
    KMS = "kms"
    SIGNER = "signer"

    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available resource type names.

        Returns the enum member names (not values) as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of resource type names in uppercase format
                (e.g., ['RDS', 'S3', 'ECR', 'ECS', ...])

        Note:
            This method returns the enum names (uppercase), not the values (lowercase).
            To get the actual string values used for naming, access the .value attribute
            of individual enum members.
        """
        return [resource_type.name for resource_type in cls]

list() classmethod

Get a list of all available resource type names.

Returns the enum member names (not values) as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of resource type names in uppercase format (e.g., ['RDS', 'S3', 'ECR', 'ECS', ...])

Note

This method returns the enum names (uppercase), not the values (lowercase). To get the actual string values used for naming, access the .value attribute of individual enum members.

Source code in mare_aws_common_lib/enums/aws_resource_type_enum.py
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available resource type names.

    Returns the enum member names (not values) as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of resource type names in uppercase format
            (e.g., ['RDS', 'S3', 'ECR', 'ECS', ...])

    Note:
        This method returns the enum names (uppercase), not the values (lowercase).
        To get the actual string values used for naming, access the .value attribute
        of individual enum members.
    """
    return [resource_type.name for resource_type in cls]

CodebuildType

Bases: Enum

Enumeration of AWS CodeBuild project types with their corresponding CDK constructs.

This enum defines the available CodeBuild project types that can be created using AWS CDK constructs. Each type corresponds to a specific CDK class and is used for determining the appropriate construct to instantiate based on the use case.

Enum members:

Name Value Description
PROJECT codebuild.Project Standalone CodeBuild project
PIPELINE_PROJECT codebuild.PipelineProject CodeBuild project for CodePipeline integration

The main difference between the types:

  • PROJECT: General-purpose build projects that can be triggered independently
  • PIPELINE_PROJECT: Specialized projects designed for seamless CodePipeline integration
Usage

This enum is typically used in builder classes or factory methods to determine which CDK construct class to instantiate when creating CodeBuild projects.

Source code in mare_aws_common_lib/enums/codebuild_type_enum.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
class CodebuildType(Enum):
    """
    Enumeration of AWS CodeBuild project types with their corresponding CDK constructs.

    This enum defines the available CodeBuild project types that can be created using
    AWS CDK constructs. Each type corresponds to a specific CDK class and is used for
    determining the appropriate construct to instantiate based on the use case.

    **Enum members:**

    | Name             | Value                          | Description                                    |
    |------------------|--------------------------------|------------------------------------------------|
    | PROJECT          | codebuild.Project              | Standalone CodeBuild project                  |
    | PIPELINE_PROJECT | codebuild.PipelineProject      | CodeBuild project for CodePipeline integration|

    The main difference between the types:

    - **PROJECT**: General-purpose build projects that can be triggered independently
    - **PIPELINE_PROJECT**: Specialized projects designed for seamless CodePipeline integration

    Usage:
        This enum is typically used in builder classes or factory methods to determine
        which CDK construct class to instantiate when creating CodeBuild projects.
    """
    PROJECT = codebuild.Project
    PIPELINE_PROJECT = codebuild.PipelineProject
    def describe(self) -> tuple[Literal['PROJECT', 'PIPELINE_PROJECT'], Union[Type[codebuild.Project], Type[codebuild.PipelineProject]]]:
        """
        Get a description of the CodeBuild type.

        Returns both the enum name and the corresponding CDK construct class
        for inspection or debugging purposes.

        Returns:
            tuple: A tuple containing the enum member name and CDK construct class
        """
        return self.name, self.value

    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available CodeBuild type names.

        Returns the enum member names as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of CodeBuild type names in uppercase format
                (e.g., ['PROJECT', 'PIPELINE_PROJECT'])

        Note:
            This method returns the enum names, not the CDK construct classes.
            To get the actual construct class, access the .value attribute
            of individual enum members.
        """
        return [cbtype.name for cbtype in cls]

describe()

Get a description of the CodeBuild type.

Returns both the enum name and the corresponding CDK construct class for inspection or debugging purposes.

Returns:

Name Type Description
tuple tuple[Literal['PROJECT', 'PIPELINE_PROJECT'], Union[Type[Project], Type[PipelineProject]]]

A tuple containing the enum member name and CDK construct class

Source code in mare_aws_common_lib/enums/codebuild_type_enum.py
37
38
39
40
41
42
43
44
45
46
47
def describe(self) -> tuple[Literal['PROJECT', 'PIPELINE_PROJECT'], Union[Type[codebuild.Project], Type[codebuild.PipelineProject]]]:
    """
    Get a description of the CodeBuild type.

    Returns both the enum name and the corresponding CDK construct class
    for inspection or debugging purposes.

    Returns:
        tuple: A tuple containing the enum member name and CDK construct class
    """
    return self.name, self.value

list() classmethod

Get a list of all available CodeBuild type names.

Returns the enum member names as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of CodeBuild type names in uppercase format (e.g., ['PROJECT', 'PIPELINE_PROJECT'])

Note

This method returns the enum names, not the CDK construct classes. To get the actual construct class, access the .value attribute of individual enum members.

Source code in mare_aws_common_lib/enums/codebuild_type_enum.py
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available CodeBuild type names.

    Returns the enum member names as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of CodeBuild type names in uppercase format
            (e.g., ['PROJECT', 'PIPELINE_PROJECT'])

    Note:
        This method returns the enum names, not the CDK construct classes.
        To get the actual construct class, access the .value attribute
        of individual enum members.
    """
    return [cbtype.name for cbtype in cls]

DeployAction

Bases: Enum

Enumeration of supported deployment action types for CI/CD pipelines.

This enum defines the available deployment targets that can be used in CodePipeline deployment stages. Each action type corresponds to a specific AWS service deployment mechanism.

Enum members:

Name Value Description
S3 s3 Deploy artifacts to S3 buckets
ECS ecs Deploy containerized applications to ECS
CLOUDFORMATION cloudformation Deploy infrastructure using CloudFormation
Usage

These deployment actions are typically used in CodePipeline configurations to specify the target deployment service for application artifacts.

Source code in mare_aws_common_lib/enums/deploy_action_enum.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class DeployAction(Enum):
    """
    Enumeration of supported deployment action types for CI/CD pipelines.

    This enum defines the available deployment targets that can be used in
    CodePipeline deployment stages. Each action type corresponds to a specific
    AWS service deployment mechanism.

    **Enum members:**

    | Name           | Value          | Description                                    |
    |----------------|----------------|------------------------------------------------|
    | S3             | s3             | Deploy artifacts to S3 buckets                 |
    | ECS            | ecs            | Deploy containerized applications to ECS       |
    | CLOUDFORMATION | cloudformation | Deploy infrastructure using CloudFormation     |

    Usage:
        These deployment actions are typically used in CodePipeline configurations
        to specify the target deployment service for application artifacts.
    """
    S3 = "s3"
    ECS = "ecs"
    CLOUDFORMATION = "cloudformation"

    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available deployment action names.

        Returns the enum member names as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of deployment action names in uppercase format
                (e.g., ['S3', 'ECS', 'CLOUDFORMATION'])

        Note:
            This method returns the enum names (uppercase), not the values (lowercase).
            To get the actual string values, access the .value attribute
            of individual enum members.
        """
        return [enumeration.name for enumeration in cls]

list() classmethod

Get a list of all available deployment action names.

Returns the enum member names as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of deployment action names in uppercase format (e.g., ['S3', 'ECS', 'CLOUDFORMATION'])

Note

This method returns the enum names (uppercase), not the values (lowercase). To get the actual string values, access the .value attribute of individual enum members.

Source code in mare_aws_common_lib/enums/deploy_action_enum.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available deployment action names.

    Returns the enum member names as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of deployment action names in uppercase format
            (e.g., ['S3', 'ECS', 'CLOUDFORMATION'])

    Note:
        This method returns the enum names (uppercase), not the values (lowercase).
        To get the actual string values, access the .value attribute
        of individual enum members.
    """
    return [enumeration.name for enumeration in cls]

Environment

Bases: Enum

Enumeration of deployment environments in the application lifecycle.

This enum defines the standard deployment environments used across the organization for application deployment and infrastructure management. Each environment represents a different stage in the software delivery pipeline.

Enum members:

Name Value Description
DEVOPS 1 DevOps/Foundation environment for shared resources
TEST 2 Testing environment for development and QA
ACCEPTANCE 3 User acceptance testing and pre-production validation
PRODUCTION 4 Live production environment for end users

Environment Progression:

  • DEVOPS: Foundation infrastructure, shared services, CI/CD pipelines
  • TEST: Development testing, integration testing, automated test suites
  • ACCEPTANCE: User acceptance testing, stakeholder validation, final pre-prod checks
  • PRODUCTION: Live customer-facing environment with full monitoring
Usage

These environments are used throughout the application configuration, infrastructure deployment, and CI/CD pipeline definitions to ensure proper environment isolation and deployment progression.

Source code in mare_aws_common_lib/enums/environment_enum.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
class Environment(Enum):
    """
    Enumeration of deployment environments in the application lifecycle.

    This enum defines the standard deployment environments used across the
    organization for application deployment and infrastructure management.
    Each environment represents a different stage in the software delivery pipeline.

    **Enum members:**

    | Name       | Value | Description                                           |
    |------------|-------|-------------------------------------------------------|
    | DEVOPS     | 1     | DevOps/Foundation environment for shared resources    |
    | TEST       | 2     | Testing environment for development and QA            |
    | ACCEPTANCE | 3     | User acceptance testing and pre-production validation |
    | PRODUCTION | 4     | Live production environment for end users             |

    Environment Progression:

    - **DEVOPS**: Foundation infrastructure, shared services, CI/CD pipelines
    - **TEST**: Development testing, integration testing, automated test suites
    - **ACCEPTANCE**: User acceptance testing, stakeholder validation, final pre-prod checks
    - **PRODUCTION**: Live customer-facing environment with full monitoring

    Usage:
        These environments are used throughout the application configuration,
        infrastructure deployment, and CI/CD pipeline definitions to ensure
        proper environment isolation and deployment progression.
    """
    DEVOPS = auto()
    TEST = auto()
    ACCEPTANCE = auto()
    PRODUCTION = auto()

    def describe(self) -> tuple[Literal['DEVOPS', 'TEST', 'ACCEPTANCE', 'PRODUCTION'], int]:
        """
        Get a description of the environment.

        Returns both the enum name and the auto-generated value
        for inspection or debugging purposes.

        Returns:
            tuple: A tuple containing the enum member name and auto-generated value
        """
        return self.name, self.value

    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available environment names.

        Returns the enum member names as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of environment names in uppercase format
                (e.g., ['DEVOPS', 'TEST', 'ACCEPTANCE', 'PRODUCTION'])

        Note:
            This method returns the enum names, not the auto-generated values.
            The auto-generated values are used internally for enum ordering
            and comparison operations.
        """
        return [env.name for env in cls]

describe()

Get a description of the environment.

Returns both the enum name and the auto-generated value for inspection or debugging purposes.

Returns:

Name Type Description
tuple tuple[Literal['DEVOPS', 'TEST', 'ACCEPTANCE', 'PRODUCTION'], int]

A tuple containing the enum member name and auto-generated value

Source code in mare_aws_common_lib/enums/environment_enum.py
38
39
40
41
42
43
44
45
46
47
48
def describe(self) -> tuple[Literal['DEVOPS', 'TEST', 'ACCEPTANCE', 'PRODUCTION'], int]:
    """
    Get a description of the environment.

    Returns both the enum name and the auto-generated value
    for inspection or debugging purposes.

    Returns:
        tuple: A tuple containing the enum member name and auto-generated value
    """
    return self.name, self.value

list() classmethod

Get a list of all available environment names.

Returns the enum member names as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of environment names in uppercase format (e.g., ['DEVOPS', 'TEST', 'ACCEPTANCE', 'PRODUCTION'])

Note

This method returns the enum names, not the auto-generated values. The auto-generated values are used internally for enum ordering and comparison operations.

Source code in mare_aws_common_lib/enums/environment_enum.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available environment names.

    Returns the enum member names as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of environment names in uppercase format
            (e.g., ['DEVOPS', 'TEST', 'ACCEPTANCE', 'PRODUCTION'])

    Note:
        This method returns the enum names, not the auto-generated values.
        The auto-generated values are used internally for enum ordering
        and comparison operations.
    """
    return [env.name for env in cls]

GitProvider

Bases: Enum

Enumeration of supported Git repository providers for CI/CD integration.

This enum defines the Git hosting services that can be used as source providers in CodePipeline configurations and other CI/CD integrations. Each provider corresponds to a specific Git hosting platform with its own authentication and integration requirements.

Enum members:

Name Value Description
CODECOMMIT codecommit AWS CodeCommit Git repositories
BITBUCKET bitbucket Atlassian Bitbucket Cloud/Server repositories
GITHUB github GitHub Cloud/Enterprise repositories
GITLAB gitlab GitLab Cloud/Self-managed repositories
Usage

These providers are used in pipeline source configurations to specify which Git hosting service contains the source code repository.

Source code in mare_aws_common_lib/enums/git_provider_enum.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class GitProvider(Enum):
    """
    Enumeration of supported Git repository providers for CI/CD integration.

    This enum defines the Git hosting services that can be used as source
    providers in CodePipeline configurations and other CI/CD integrations.
    Each provider corresponds to a specific Git hosting platform with its
    own authentication and integration requirements.

    **Enum members:**

    | Name        | Value      | Description                                    |
    |-------------|------------|------------------------------------------------|
    | CODECOMMIT  | codecommit | AWS CodeCommit Git repositories                |
    | BITBUCKET   | bitbucket  | Atlassian Bitbucket Cloud/Server repositories  |
    | GITHUB      | github     | GitHub Cloud/Enterprise repositories           |
    | GITLAB      | gitlab     | GitLab Cloud/Self-managed repositories         |


    Usage:
        These providers are used in pipeline source configurations to specify
        which Git hosting service contains the source code repository.
    """
    CODECOMMIT = "codecommit"
    BITBUCKET = "bitbucket"
    GITHUB = "github"
    GITLAB = "gitlab"

    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available Git provider names.

        Returns the enum member names as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of Git provider names in uppercase format
                (e.g., ['CODECOMMIT', 'BITBUCKET', 'GITHUB', 'GITLAB'])

        Note:
            This method returns the enum names (uppercase), not the values (lowercase).
            To get the actual string values used in configurations, access the .value
            attribute of individual enum members.
        """
        return [provider.name for provider in cls]

list() classmethod

Get a list of all available Git provider names.

Returns the enum member names as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of Git provider names in uppercase format (e.g., ['CODECOMMIT', 'BITBUCKET', 'GITHUB', 'GITLAB'])

Note

This method returns the enum names (uppercase), not the values (lowercase). To get the actual string values used in configurations, access the .value attribute of individual enum members.

Source code in mare_aws_common_lib/enums/git_provider_enum.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available Git provider names.

    Returns the enum member names as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of Git provider names in uppercase format
            (e.g., ['CODECOMMIT', 'BITBUCKET', 'GITHUB', 'GITLAB'])

    Note:
        This method returns the enum names (uppercase), not the values (lowercase).
        To get the actual string values used in configurations, access the .value
        attribute of individual enum members.
    """
    return [provider.name for provider in cls]

PipelineType

Bases: Enum

Enumeration of CI/CD pipeline types based on their primary purpose.

This enum defines the different types of pipelines that can be created based on their role in the software delivery lifecycle. Each type represents a specific stage or combination of stages in the CI/CD process.

Enum members:

Name Value Description
SOURCE source Source-only pipeline for artifact creation
BUILD build Build-focused pipeline for compilation and testing
RELEASE release Release pipeline for artifact promotion
DEPLOY deploy Deployment-focused pipeline for environment delivery
QA qa Build and assess the quality of the code.
Usage

These pipeline types are used to categorize and configure pipelines based on their intended purpose in the software delivery workflow.

Source code in mare_aws_common_lib/enums/pipeline_type_enum.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class PipelineType(Enum):
    """
    Enumeration of CI/CD pipeline types based on their primary purpose.

    This enum defines the different types of pipelines that can be created
    based on their role in the software delivery lifecycle. Each type
    represents a specific stage or combination of stages in the CI/CD process.

    **Enum members:**

    | Name    | Value   | Description                                           |
    |---------|---------|-------------------------------------------------------|
    | SOURCE  | source  | Source-only pipeline for artifact creation            |
    | BUILD   | build   | Build-focused pipeline for compilation and testing    |
    | RELEASE | release | Release pipeline for artifact promotion               |
    | DEPLOY  | deploy  | Deployment-focused pipeline for environment delivery  |
    | QA      | qa      | Build and assess the quality of the code.             |

    Usage:
        These pipeline types are used to categorize and configure pipelines
        based on their intended purpose in the software delivery workflow.
    """
    SOURCE = "source"
    BUILD = "build"
    RELEASE = "release"
    DEPLOY = "deploy"
    QA = "qa"

    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available pipeline type names.

        Returns the enum member names as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of pipeline type names in uppercase format
                (e.g., ['SOURCE', 'BUILD', 'RELEASE', 'DEPLOY'])

        Note:
            This method returns the enum names (uppercase), not the values (lowercase).
            To get the actual string values used in configurations, access the .value
            attribute of individual enum members.
        """
        return [pipeline_type.name for pipeline_type in cls]

list() classmethod

Get a list of all available pipeline type names.

Returns the enum member names as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of pipeline type names in uppercase format (e.g., ['SOURCE', 'BUILD', 'RELEASE', 'DEPLOY'])

Note

This method returns the enum names (uppercase), not the values (lowercase). To get the actual string values used in configurations, access the .value attribute of individual enum members.

Source code in mare_aws_common_lib/enums/pipeline_type_enum.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available pipeline type names.

    Returns the enum member names as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of pipeline type names in uppercase format
            (e.g., ['SOURCE', 'BUILD', 'RELEASE', 'DEPLOY'])

    Note:
        This method returns the enum names (uppercase), not the values (lowercase).
        To get the actual string values used in configurations, access the .value
        attribute of individual enum members.
    """
    return [pipeline_type.name for pipeline_type in cls]

StageType

Bases: Enum

Enumeration of CI/CD pipeline stage types for different workflow operations.

This enum defines the available stage types that can be used in CodePipeline configurations. Each stage type represents a specific operation or checkpoint in the software delivery workflow, from source retrieval to deployment.

Enum members:

Name Value Description
SOURCE source Automated source code retrieval from repositories
MANUAL_SOURCE manual_source Manual source artifact upload or trigger
MANUAL_APPROVAL manual_approval Human approval checkpoint in the pipeline
SELF_MUTATE self_mutate Pipeline self-update and configuration changes
BUILD build Code compilation, testing, and artifact creation
RELEASE release Artifact promotion and release preparation
PUBLISH publish Artifact publishing to repositories or registries
DEPLOY deploy Application deployment to target environments
CONTROL control Pipeline control and orchestration operations
SYNTH synth CDK synth

Stage Type Categories: - Source Stages: SOURCE, MANUAL_SOURCE - Get code/artifacts into the pipeline - Quality Gates: MANUAL_APPROVAL - Human checkpoints for quality/compliance - Processing Stages: BUILD, RELEASE, PUBLISH - Transform and package artifacts - Deployment Stages: DEPLOY - Deliver applications to environments - Meta Stages: SELF_MUTATE, CONTROL - Pipeline management and orchestration

Usage

These stage types are used to define and categorize pipeline stages based on their function in the CI/CD workflow.

Source code in mare_aws_common_lib/enums/stage_type_enum.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
class StageType(Enum):
    """
    Enumeration of CI/CD pipeline stage types for different workflow operations.

    This enum defines the available stage types that can be used in CodePipeline
    configurations. Each stage type represents a specific operation or checkpoint
    in the software delivery workflow, from source retrieval to deployment.

    **Enum members:**

    | Name            | Value           | Description                                        |
    |-----------------|-----------------|--------------------------------------------------  |
    | SOURCE          | source          | Automated source code retrieval from repositories  |
    | MANUAL_SOURCE   | manual_source   | Manual source artifact upload or trigger           |
    | MANUAL_APPROVAL | manual_approval | Human approval checkpoint in the pipeline          |
    | SELF_MUTATE     | self_mutate     | Pipeline self-update and configuration changes     |
    | BUILD           | build           | Code compilation, testing, and artifact creation   |
    | RELEASE         | release         | Artifact promotion and release preparation         |
    | PUBLISH         | publish         | Artifact publishing to repositories or registries  |
    | DEPLOY          | deploy          | Application deployment to target environments      |
    | CONTROL         | control         | Pipeline control and orchestration operations      |
    | SYNTH           | synth           | CDK synth                                          |

    Stage Type Categories:
    - **Source Stages**: SOURCE, MANUAL_SOURCE - Get code/artifacts into the pipeline
    - **Quality Gates**: MANUAL_APPROVAL - Human checkpoints for quality/compliance
    - **Processing Stages**: BUILD, RELEASE, PUBLISH - Transform and package artifacts
    - **Deployment Stages**: DEPLOY - Deliver applications to environments
    - **Meta Stages**: SELF_MUTATE, CONTROL - Pipeline management and orchestration

    Usage:
        These stage types are used to define and categorize pipeline stages
        based on their function in the CI/CD workflow.
    """
    SOURCE = "source"
    MANUAL_SOURCE = "manual_source"
    MANUAL_APPROVAL = "manual_approval"
    SELF_MUTATE = "self_mutate"
    BUILD = "build"
    RELEASE = "release"
    PUBLISH = "publish"
    DEPLOY = "deploy"
    CONTROL = "control"
    SYNTH = "synth"


    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available stage type names.

        Returns the enum member names as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of stage type names in uppercase format
                (e.g., ['SOURCE', 'MANUAL_SOURCE', 'MANUAL_APPROVAL', ...])
        Note:
            This method returns the enum names (uppercase), not the values (lowercase).
            To get the actual string values used in configurations, access the .value
            attribute of individual enum members.
        """
        return [stage_type.name for stage_type in cls]

list() classmethod

Get a list of all available stage type names.

Returns the enum member names as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of stage type names in uppercase format (e.g., ['SOURCE', 'MANUAL_SOURCE', 'MANUAL_APPROVAL', ...])

Note: This method returns the enum names (uppercase), not the values (lowercase). To get the actual string values used in configurations, access the .value attribute of individual enum members.

Source code in mare_aws_common_lib/enums/stage_type_enum.py
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available stage type names.

    Returns the enum member names as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of stage type names in uppercase format
            (e.g., ['SOURCE', 'MANUAL_SOURCE', 'MANUAL_APPROVAL', ...])
    Note:
        This method returns the enum names (uppercase), not the values (lowercase).
        To get the actual string values used in configurations, access the .value
        attribute of individual enum members.
    """
    return [stage_type.name for stage_type in cls]

Usage

Bases: Enum

Enumeration of resource usage contexts for application components and pipelines.

This enum defines the different usage patterns and purposes for AWS resources and CI/CD pipelines. Each usage type represents a specific function, technology stack, or operational context that helps categorize and name resources appropriately.

Enum members:

Name Value Description
AMI ami Amazon Machine Image creation and management
CDK cdk AWS CDK infrastructure as code deployment
LIQUIBASE liquibase Database schema migration and versioning
FRONTEND frontend Frontend application deployment (web, mobile)
BACKEND_JAVA backend_java Java-based backend service deployment
BACKEND_DOCKER backend_docker Containerized backend service deployment
TAG_COMMIT tag_commit Git tagging and commit management operations
DYNAMODB dynamodb DynamoDB database operations and management
CONTROL control Pipeline control and orchestration
BUILD build Code compilation and artifact creation
RELEASE release Artifact promotion and release management
DEPLOY deploy Application deployment to environments
BUILD_RELEASE build_release Combined build and release operations
BUILD_DEPLOY build_deploy Combined build and deployment operations
BUILD_ASSESS build_assess Combined build and quality assessment.
SELF_MUTATE self_mutate Pipeline self-updating and configuration changes
S3 s3 S3 storage operations and artifact management
SYNC sync Syncing operations (s3 buckets, efs filesystems)
SIGN sign ECR image signatures
Usage

These usage types are used with resource builders and naming utilities to provide context-specific configuration and naming for AWS resources.

Source code in mare_aws_common_lib/enums/usage_enum.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
class Usage(Enum):
    """
    Enumeration of resource usage contexts for application components and pipelines.

    This enum defines the different usage patterns and purposes for AWS resources
    and CI/CD pipelines. Each usage type represents a specific function, technology
    stack, or operational context that helps categorize and name resources appropriately.

    **Enum members:**

    | Name            | Value           | Description                                        |
    |-----------------|-----------------|--------------------------------------------------- |
    | AMI             | ami             | Amazon Machine Image creation and management       |
    | CDK             | cdk             | AWS CDK infrastructure as code deployment          |
    | LIQUIBASE       | liquibase       | Database schema migration and versioning           |
    | FRONTEND        | frontend        | Frontend application deployment (web, mobile)      |
    | BACKEND_JAVA    | backend_java    | Java-based backend service deployment              |
    | BACKEND_DOCKER  | backend_docker  | Containerized backend service deployment           |
    | TAG_COMMIT      | tag_commit      | Git tagging and commit management operations       |
    | DYNAMODB        | dynamodb        | DynamoDB database operations and management        |
    | CONTROL         | control         | Pipeline control and orchestration                 |
    | BUILD           | build           | Code compilation and artifact creation             |
    | RELEASE         | release         | Artifact promotion and release management          |
    | DEPLOY          | deploy          | Application deployment to environments             |
    | BUILD_RELEASE   | build_release   | Combined build and release operations              |
    | BUILD_DEPLOY    | build_deploy    | Combined build and deployment operations           |
    | BUILD_ASSESS    | build_assess    | Combined build and quality assessment.             |
    | SELF_MUTATE     | self_mutate     | Pipeline self-updating and configuration changes   |
    | S3              | s3              | S3 storage operations and artifact management      |
    | SYNC            | sync            | Syncing operations (s3 buckets, efs filesystems)   |
    | SIGN            | sign            | ECR image signatures                               |

    Usage:
        These usage types are used with resource builders and naming utilities
        to provide context-specific configuration and naming for AWS resources.
    """
    AMI = "ami"
    CDK = "cdk"
    LIQUIBASE = "liquibase"
    FRONTEND = "frontend"
    BACKEND_JAVA = "backend_java"
    BACKEND_DOCKER = "backend_docker"
    TAG_COMMIT = "tag_commit"
    DYNAMODB = "dynamodb"
    CONTROL = "control"
    BUILD = "build"
    RELEASE = "release"
    DEPLOY = "deploy"
    BUILD_RELEASE = "build_release"
    BUILD_DEPLOY = "build_deploy"
    BUILD_ASSESS = "build_assess"
    SELF_MUTATE = "self_mutate"
    S3 = "s3"
    SYNTH = "synth"
    SIGN = "sign"

    @classmethod
    def list(cls) -> List[str] :
        """
        Get a list of all available usage type names.

        Returns the enum member names as a list of strings.
        Useful for validation, configuration, and displaying available options.

        Returns:
            List[str]: List of usage type names in uppercase format
                (e.g., ['AMI', 'CDK', 'LIQUIBASE', 'FRONTEND', ...])

        Note:
            This method returns the enum names (uppercase), not the values (lowercase).
            To get the actual string values used in configurations, access the .value
            attribute of individual enum members.
        """
        return [usage.name for usage in cls]

list() classmethod

Get a list of all available usage type names.

Returns the enum member names as a list of strings. Useful for validation, configuration, and displaying available options.

Returns:

Type Description
List[str]

List[str]: List of usage type names in uppercase format (e.g., ['AMI', 'CDK', 'LIQUIBASE', 'FRONTEND', ...])

Note

This method returns the enum names (uppercase), not the values (lowercase). To get the actual string values used in configurations, access the .value attribute of individual enum members.

Source code in mare_aws_common_lib/enums/usage_enum.py
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
@classmethod
def list(cls) -> List[str] :
    """
    Get a list of all available usage type names.

    Returns the enum member names as a list of strings.
    Useful for validation, configuration, and displaying available options.

    Returns:
        List[str]: List of usage type names in uppercase format
            (e.g., ['AMI', 'CDK', 'LIQUIBASE', 'FRONTEND', ...])

    Note:
        This method returns the enum names (uppercase), not the values (lowercase).
        To get the actual string values used in configurations, access the .value
        attribute of individual enum members.
    """
    return [usage.name for usage in cls]