1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
0
Try creating a custom mappings for your values to interface with the CLI output .
# Define a mapping dictionary for engine values
engine_mapping = {
"aurora-mysql": "Aurora MySQL",
"oracle-ee": {"databaseEdition": "Enterprise", "databaseEngine": "Oracle"},
"oracle--ee-cdb": {"databaseEdition": "Enterprise", "databaseEngine": "Oracle"},
"oracle--se2": {"databaseEdition": "Standard", "databaseEngine": "Oracle"},
"oracle--se2-cdb": {"databaseEdition": "Standard", "databaseEngine": "Oracle"},
"custom-oracle-ee": {"databaseEdition": "Enterprise", "databaseEngine": "Oracle"},
# Add more mappings as needed
}
# Function to retrieve pricing information based on engine
def get_pricing_info(engine):
if engine in engine_mapping:
if isinstance(engine_mapping[engine], str):
return engine_mapping[engine]
elif isinstance(engine_mapping[engine], dict):
return engine_mapping[engine]["databaseEngine"], engine_mapping[engine]["databaseEdition"]
else:
return None
# Example usage:
engine = "aurora-mysql"
pricing_info = get_pricing_info(engine)
if pricing_info:
print("Database Engine:", pricing_info)
else:
print("Pricing information not found for engine:", engine)
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren
Hi! Thanks so much for your reply however unfortunately this does not solve my problem, the engine names are limited. As I mentioned there can be RDS DBs with the dataBaseEngine 'Oracle' and the edition 'Standard One' OR the edition 'Standard One' , which one of the received engine names would I map to that? none of the 5 oracle related ones map to it perfectly which is why I am a bit confused.