# EC2实例信息
AWS_INSTANCE_INFO = {
    # T2 系列 - 入门级通用型
    "t2.nano": {"cpu": 1, "memory": 0.5, "description": "入门级通用型实例，适合轻量级工作负载"},
    "t2.micro": {"cpu": 1, "memory": 1, "description": "具成本效益的入门级实例"},
    "t2.small": {"cpu": 1, "memory": 2, "description": "低成本通用实例"},
    "t2.medium": {"cpu": 2, "memory": 4, "description": "中等负载通用实例"},
    "t2.large": {"cpu": 2, "memory": 8, "description": "大型通用实例"},
    "t2.xlarge": {"cpu": 4, "memory": 16, "description": "超大型通用实例"},
    "t2.2xlarge": {"cpu": 8, "memory": 32, "description": "双倍超大型通用实例"},
    
    # T3 系列 - 新一代通用型
    "t3.nano": {"cpu": 1, "memory": 0.5, "description": "新一代入门级通用型实例"},
    "t3.micro": {"cpu": 1, "memory": 1, "description": "新一代低成本通用实例"},
    "t3.small": {"cpu": 1, "memory": 2, "description": "新一代小型通用实例"},
    "t3.medium": {"cpu": 2, "memory": 4, "description": "新一代中等负载通用实例"},
    "t3.large": {"cpu": 2, "memory": 8, "description": "新一代大型通用实例"},
    "t3.xlarge": {"cpu": 4, "memory": 16, "description": "新一代超大型通用实例"},
    "t3.2xlarge": {"cpu": 8, "memory": 32, "description": "新一代双倍超大型通用实例"},

    # T3a 系列 - 新一代通用型
    "t3a.nano": {"cpu": 1, "memory": 0.5, "description": "新一代入门级通用型实例"},
    "t3a.micro": {"cpu": 1, "memory": 1, "description": "新一代低成本通用实例"},
    "t3a.small": {"cpu": 1, "memory": 2, "description": "新一代小型通用实例"},
    "t3a.medium": {"cpu": 2, "memory": 4, "description": "新一代中等负载通用实例"},
    "t3a.large": {"cpu": 2, "memory": 8, "description": "新一代大型通用实例"},
    "t3a.xlarge": {"cpu": 4, "memory": 16, "description": "新一代超大型通用实例"},
    "t3a.2xlarge": {"cpu": 8, "memory": 32, "description": "新一代双倍超大型通用实例"},
    
    # C5 系列 - 计算优化型
    "c5.large": {"cpu": 2, "memory": 4, "description": "计算优化实例"},
    "c5.xlarge": {"cpu": 4, "memory": 8, "description": "高性能计算优化实例"},
    "c5.2xlarge": {"cpu": 8, "memory": 16, "description": "大规模计算优化实例"},
    "c5.4xlarge": {"cpu": 16, "memory": 32, "description": "超大规模计算优化实例"},
    "c5.9xlarge": {"cpu": 36, "memory": 72, "description": "高性能计算优化实例"},
    "c5.12xlarge": {"cpu": 48, "memory": 96, "description": "大规模计算优化实例"},
    "c5.18xlarge": {"cpu": 72, "memory": 144, "description": "超大规模计算优化实例"},
    "c5.24xlarge": {"cpu": 96, "memory": 192, "description": "最大规模计算优化实例"},
    
    
    # c6a 系列 - 新一代计算优化型
    "c6a.large": {"cpu": 2, "memory": 4, "description": "新一代计算优化实例"},
    "c6a.xlarge": {"cpu": 4, "memory": 8, "description": "新一代高性能计算优化实例"},
    "c6a.2xlarge": {"cpu": 8, "memory": 16, "description": "新一代大规模计算优化实例"},
    "c6a.4xlarge": {"cpu": 16, "memory": 32, "description": "新一代超大规模计算优化实例"},
    "c6a.8xlarge": {"cpu": 32, "memory": 64, "description": "新一代高性能计算优化实例"},
    "c6a.12xlarge": {"cpu": 48, "memory": 96, "description": "新一代大规模计算优化实例"},
    "c6a.16xlarge": {"cpu": 64, "memory": 128, "description": "新一代超大规模计算优化实例"},
    "c6a.24xlarge": {"cpu": 96, "memory": 192, "description": "新一代最大规模计算优化实例"},
    "c6a.32xlarge": {"cpu": 128, "memory": 256, "description": "新一代最大规模计算优化实例"},
    # R5 系列 - 内存优化型
    "r5.large": {"cpu": 2, "memory": 16, "description": "内存优化实例"},
    "r5.xlarge": {"cpu": 4, "memory": 32, "description": "高性能内存优化实例"},
    "r5.2xlarge": {"cpu": 8, "memory": 64, "description": "大规模内存优化实例"},
    "r5.4xlarge": {"cpu": 16, "memory": 128, "description": "超大规模内存优化实例"},
    "r5.8xlarge": {"cpu": 32, "memory": 256, "description": "高性能内存优化实例"},
    "r5.12xlarge": {"cpu": 48, "memory": 384, "description": "大规模内存优化实例"},
    "r5.16xlarge": {"cpu": 64, "memory": 512, "description": "超大规模内存优化实例"},
    "r5.24xlarge": {"cpu": 96, "memory": 768, "description": "最大规模内存优化实例"},
    
    # R6a  系列 - 新一代内存优化型
    "r6a.large": {"cpu": 2, "memory": 16, "description": "新一代内存优化实例"},
    "r6a.xlarge": {"cpu": 4, "memory": 32, "description": "新一代高性能内存优化实例"},
    "r6a.2xlarge": {"cpu": 8, "memory": 64, "description": "新一代大规模内存优化实例"},
    "r6a.4xlarge": {"cpu": 16, "memory": 128, "description": "新一代超大规模内存优化实例"},
    "r6a.8xlarge": {"cpu": 32, "memory": 256, "description": "新一代高性能内存优化实例"},
    "r6a.12xlarge": {"cpu": 48, "memory": 384, "description": "新一代大规模内存优化实例"},
    "r6a.16xlarge": {"cpu": 64, "memory": 512, "description": "新一代超大规模内存优化实例"},
    "r6a.24xlarge": {"cpu": 96, "memory": 768, "description": "新一代最大规模内存优化实例"},
    "r6a.32xlarge": {"cpu": 128, "memory": 1024, "description": "新一代最大规模内存优化实例"},
    
    # M5 系列 - 通用型
    "m5.large": {"cpu": 2, "memory": 8, "description": "平衡型计算和内存实例"},
    "m5.xlarge": {"cpu": 4, "memory": 16, "description": "高性能平衡型实例"},
    "m5.2xlarge": {"cpu": 8, "memory": 32, "description": "大规模工作负载平衡型实例"},
    "m5.4xlarge": {"cpu": 16, "memory": 64, "description": "超大规模工作负载平衡型实例"},
    "m5.8xlarge": {"cpu": 32, "memory": 128, "description": "高性能工作负载平衡型实例"},
    "m5.12xlarge": {"cpu": 48, "memory": 192, "description": "大规模工作负载平衡型实例"},
    "m5.16xlarge": {"cpu": 64, "memory": 256, "description": "超大规模工作负载平衡型实例"},
    "m5.24xlarge": {"cpu": 96, "memory": 384, "description": "最大规模工作负载平衡型实例"},
    
    # M6a 系列 - 新一代通用型
    "m6a.large": {"cpu": 2, "memory": 8, "description": "新一代平衡型计算和内存实例"},
    "m6a.xlarge": {"cpu": 4, "memory": 16, "description": "新一代高性能平衡型实例"},
    "m6a.2xlarge": {"cpu": 8, "memory": 32, "description": "新一代大规模工作负载平衡型实例"},
    "m6a.4xlarge": {"cpu": 16, "memory": 64, "description": "新一代超大规模工作负载平衡型实例"},
    "m6a.8xlarge": {"cpu": 32, "memory": 128, "description": "新一代高性能工作负载平衡型实例"},
    "m6a.12xlarge": {"cpu": 48, "memory": 192, "description": "新一代大规模工作负载平衡型实例"},
    "m6a.16xlarge": {"cpu": 64, "memory": 256, "description": "新一代超大规模工作负载平衡型实例"},
    "m6a.24xlarge": {"cpu": 96, "memory": 384, "description": "新一代最大规模工作负载平衡型实例"},
    "m6a.32xlarge": {"cpu": 128, "memory": 512, "description": "新一代最大规模工作负载平衡型实例"}
}

# Azure实例信息 - 待添加
AZURE_INSTANCE_INFO = {
    # 占位符，后续可以添加Azure的实例类型
}

# 阿里云实例信息 - 待添加
ALIYUN_INSTANCE_INFO = {
    # 占位符，后续可以添加阿里云的实例类型
}

# 获取指定平台的实例信息
def get_instance_info(platform: str = "aws"):
    if platform == "aws":
        return AWS_INSTANCE_INFO
    elif platform == "azure":
        return AZURE_INSTANCE_INFO
    elif platform == "aliyun":
        return ALIYUN_INSTANCE_INFO
    else:
        raise ValueError(f"不支持的平台: {platform}") 