awspricingfull module

AWS Instances (EC2, ElastiCache, RDS, Redshift) pricing retrieval project.

Project contains one module which is designed to retrieve the AWS prices for four major AWS services that have reserved instances involved: EC2, ElastiCache, RDS and Redshift. The prices either On-Demand or Reserved (specified by user) can be retrieved to Command Line in JSON, Table (Prettytable) or CSV formats. CSV format option also saves the csv file to the folder specified by user, which is the main use case.

The undocumented AWS pricing APIa are used as the sources. The same APIs serve the data to the AWS pricing pages. Both current and previous generation instance prices are retrieved.

Latest update: New pricing scheme (noUpfront, allUpfront, PartialUpfront) compatibility for RDS and Redshift is added. Minor bugs fixed.

Created: 25 March, 2015

Updated: 19 June, 2015

@author: Ilia Semenov

@version: 2.0

class awspricingfull.AWSPrices

Bases: object

Abstract class - base for the pricing retrieval classes for different services.

DEFAULT_CURRENCY

str

USD Currency used in every AWS pricing by default.

REGIONS

list of str

List of AWS regions.

JSON_NAME_TO_REGIONS_API

dict of str: str

Mapping of some internal AWS region names used in few sources to the conventional ones.

get_ondemand_instances_prices()
Abstract method for getting On-Demand pricing.
Implemented in child classes.
Raises:NotImplementedError – Abstract method is not implemented.
get_reserved_instances_prices()
Abstract method for getting Reserved pricing.
Implemented in child classes.
Raises:NotImplementedError – Abstract method is not implemented.
load_data(url)

Method for retrieving the pricing data in a clean dictionary format.

Parameters:url – The pricing source url.
Returns:data – Pricing data in a dictionary format
Return type:dict of dict: dict
none_as_string(v)

Method for returning a blank string instead of None.

Parameters:v – The value to be checked for None.
Returns:v or “” is v is None.
return_json(u)

Method printing the pricing data in JSON format to Console.

Parameters:u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
Returns:Pricing data in JSON string format or an error message.
Return type:str
class awspricingfull.AllAWSPrices

Bases: awspricingfull.AWSPrices

Class for retrieving the instance pricing for 4 AWS Services:
EC2, RDS, ElastiCache and Redshift. Child of awspricingfull.AWSPrices class.
ec2

EC2Prices

instance of awspricingfull.EC2Prices class containing methods for EC2 pricing retrieval.

elc

ELCPrices

instance of awspricingfull.ELCPrices class containing methods for ElastiCache pricing retrieval.

rds

RDSPrices

instance of awspricingfull.RDSPrices class containing methods for RDS pricing retrieval.

rs

RSPrices

instance of awspricingfull.RSPrices class containing methods for Redshift pricing retrieval.

return_json(u)

Method printing the pricing data in JSON format to Console.

Parameters:u (str) – Parameter specifying On-Demand (“ondemand”), Reserved (“reserved”) or both (“all”) pricing option.
Returns:Pricing data in JSON string format or an error message.
Return type:str
save_csv(u, path='C:\\Users\\isemenov\\workspace\\awspricingfull\\docs\\', name=None)
Method saving the full pricing data in CSV format to the
cpecified location.
Parameters:
  • u (str) – Parameter specifying On-Demand (“ondemand”), Reserved (“reserved”) or both (“all”) pricing option.
  • path (str) – System path for saving the data file. Current directory is the the defauilt value.
  • name (str) – The desired name of the file. The default values are “FULL_reserved_pricing.csv” for Reserved, “FULL_ondemand_pricing.csv” for On-Demand and “FULL_all_pricing.csv” for both.
Returns:

Prints Full pricing in the CSV format (console).

class awspricingfull.EC2Prices

Bases: awspricingfull.AWSPrices

Class for retrieving the EC2 pricing. Child of awspricingfull.AWSPrices class.

INSTANCES_RESERVED_LINUX_URL

str

Undocumented AWS Pricing API URL - EC2 Linux Reserved, Current Generation.

INSTANCES_RESERVED_RHEL_URL

str

Undocumented AWS Pricing API URL - EC2 RHEL Reserved, Current Generation.

INSTANCES_RESERVED_SLES_URL

str

Undocumented AWS Pricing API URL - EC2 SLES Reserved, Current Generation.

INSTANCES_RESERVED_WINDOWS_URL

str

Undocumented AWS Pricing API URL - EC2 Windows Reserved, Current Generation.

INSTANCES_RESERVED_WINSQL_URL

str

Undocumented AWS Pricing API URL - EC2 Windows SQL Reserved, Current Generation.

INSTANCES_RESERVED_WINSQLWEB_URL

str

Undocumented AWS Pricing API URL - EC2 Windows SQL Web Reserved, Current Generation.

PG_INSTANCES_RESERVED_LINUX_URL

str

Undocumented AWS Pricing API URL - EC2 Linux Reserved, Previous Generation.

PG_INSTANCES_RESERVED_RHEL_URL

str

Undocumented AWS Pricing API URL - EC2 RHEL Reserved, Previous Generation.

PG_INSTANCES_RESERVED_SLES_URL

str

Undocumented AWS Pricing API URL - EC2 SLES Reserved, Previous Generation.

PG_INSTANCES_RESERVED_WINDOWS_URL

str

Undocumented AWS Pricing API URL - EC2 Windows Reserved, Previous Generation.

PG_INSTANCES_RESERVED_WINSQL_URL

str

Undocumented AWS Pricing API URL - EC2 Windows SQL Reserved, Previous Generation.

PG_INSTANCES_RESERVED_WINSQLWEB_URL

str

Undocumented AWS Pricing API URL - EC2 Windows SQL Web Reserved, Previous Generation.

INSTANCES_ONDEMAND_LINUX_URL

str

Undocumented AWS Pricing API URL - EC2 Linux On-Demand, Current Generation.

INSTANCES_ONDEMAND_RHEL_URL

str

Undocumented AWS Pricing API URL - EC2 RHEL On-Demand, Current Generation.

INSTANCES_ONDEMAND_SLES_URL

str

Undocumented AWS Pricing API URL - EC2 SLES On-Demand, Current Generation.

INSTANCES_ONDEMAND_WINDOWS_URL

str

Undocumented AWS Pricing API URL - EC2 Windows On-Demand, Current Generation.

INSTANCES_ONDEMAND_WINSQL_URL

str

Undocumented AWS Pricing API URL - EC2 Windows SQL On-Demand, Current Generation.

INSTANCES_ONDEMAND_WINSQLWEB_URL

str

Undocumented AWS Pricing API URL - EC2 Windows SQL Web On-Demand, Current Generation.

PG_INSTANCES_ONDEMAND_LINUX_URL

str

Undocumented AWS Pricing API URL - EC2 Linux On-Demand, Previous Generation.

PG_INSTANCES_ONDEMAND_RHEL_URL

str

Undocumented AWS Pricing API URL - EC2 RHEL On-Demand, Previous Generation.

PG_INSTANCES_ONDEMAND_SLES_URL

str

Undocumented AWS Pricing API URL - EC2 SLES On-Demand, Previous Generation.

PG_INSTANCES_ONDEMAND_WINDOWS_URL

str

Undocumented AWS Pricing API URL - EC2 Windows On-Demand, Previous Generation.

PG_INSTANCES_ONDEMAND_WINSQL_URL

str

Undocumented AWS Pricing API URL - EC2 Windows SQL On-Demand, Previous Generation.

PG_INSTANCES_ONDEMAND_WINSQLWEB_URL

str

Undocumented AWS Pricing API URL - EC2 Windows SQL Web On-Demand, Previous Generation.

INSTANCES_ONDEMAND_OS_TYPE_BY_URL

dict of str: str

Mapping of On-Dermand urls to OS types.

INSTANCES_RESERVED_OS_TYPE_BY_URL

dict of str: str

Mapping of Reserved urls to OS types.

get_ondemand_instances_prices()

Implementation of method for getting EC2 On-Demand pricing.

Returns:result – EC2 On-Demand pricing in dictionary format.
Return type:dict of dict: dict
get_reserved_instances_prices()

Implementation of method for getting EC2 Reserved pricing.

Returns:result – EC2 Reserved pricing in dictionary format.
Return type:dict of dict: dict
print_table(u)
Method printing the EC2 pricing data to the console
in the Pretty Table format (requires Pretty Table import).
Parameters:u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
Returns:Prints EC2 pricing in the Pretty Table format.
save_csv(u, path='C:\\Users\\isemenov\\workspace\\awspricingfull\\docs\\', name=None)
Method saving the EC2 pricing data in CSV format to the
cpecified location.
Parameters:
  • u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
  • path (str) – System path for saving the data file. Current directory is the the defauilt value.
  • name (str) – The desired name of the file. The default values are “EC2_reserved_pricing.csv” for Reserved and “EC2_ondemand_pricing.csv” for On-Demand.
Returns:

Prints EC2 pricing in the CSV format (console).

class awspricingfull.ELCPrices

Bases: awspricingfull.AWSPrices

Class for retrieving the ElastiCache pricing. Child of awspricingfull.AWSPrices class.

INSTANCES_ON_DEMAND_URL

str

Undocumented AWS Pricing API URL - On-Demand ELC Current Generation.

PG_INSTANCES_ON_DEMAND_URL

str

Undocumented AWS Pricing API URL - On-Demand ELC Previous Generation.

INSTANCES_RESERVED_LIGHT_UTILIZATION_URL

str

Undocumented AWS Pricing - Light Reserved ELC Current Generation.

INSTANCES_RESERVED_MEDIUM_UTILIZATION_URL

str

Undocumented AWS Pricing- Medium Reserved ELC Current Generation.

INSTANCES_RESERVED_HEAVY_UTILIZATION_URL

str

Undocumented AWS Pricing- Heavy Reserved ELC Current Generation.

PG_INSTANCES_RESERVED_LIGHT_UTILIZATION_URL

str

Undocumented AWS Pricing- Light Reserved ELC Previous Generation.

PG_INSTANCES_RESERVED_MEDIUM_UTILIZATION_URL

str

Undocumented AWS Pricing- Medium Reserved ELC Previous Generation.

PG_INSTANCES_RESERVED_HEAVY_UTILIZATION_URL

str

Undocumented AWS Pricing- Heavy Reserved ELC Previous Generation.

INSTANCES_RESERVED_UTILIZATION_TYPE_BY_URL

dict of str: str

Mapping of Reserved urls to Reservation types.

INSTANCE_TYPE_MAPPING

dict of str: str

Mapping of internal AWS ELC Type names to the conventional analogs.

get_ondemand_instances_prices()

Implementation of method for getting ELC On-Denand pricing.

Returns:result – ELC On-Denand pricing in dictionary format.
Return type:dict of dict: dict
get_reserved_instances_prices()

Implementation of method for getting ELC Reserved pricing.

Returns:result – ELC Reserved pricing in dictionary format.
Return type:dict of dict: dict
print_table(u)
Method printing the ELC pricing data to the console
in the Pretty Table format (requires Pretty Table import).
Parameters:u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
Returns:Prints ELC pricing in the Pretty Table format.
save_csv(u, path='C:\\Users\\isemenov\\workspace\\awspricingfull\\docs\\', name=None)
Method saving the ELC pricing data in CSV format to the
cpecified location.
Parameters:
  • u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
  • path (str) – System path for saving the data file. Current directory is the the defauilt value.
  • name (str) – The desired name of the file. The default values are “ELC_reserved_pricing.csv” for Reserved and “ELC_ondemand_pricing.csv” for On-Demand.
Returns:

Prints ELC pricing in the CSV format (console).

class awspricingfull.RDSPrices

Bases: awspricingfull.AWSPrices

Class for retrieving the RDS pricing. Child of awspricingfull.AWSPrices class.

RDS_MYSQL_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MySQL GPL, On-Demand, Current Generation.

RDS_MYSQL_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ MySQL GPL, On-Demand, Current Generation.

RDS_ORACLE_LICENSED_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ Oracle Licensed, On-Demand, Current Generation.

RDS_ORACLE_LICENSED_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ Oracle Licensed, On-Demand, Current Generation.

RDS_ORACLE_BYOL_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ Oracle BYOL, On-Demand, Current Generation.

RDS_ORACLE_BYOL_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ Oracle BYOL, On-Demand, Current Generation.

RDS_MSSQL_LICENSED_EXPRESS_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server Express Licensed, On-Demand, Current Generation.

RDS_MSSQL_LICENSED_WEB_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server WEB Licensed, On-Demand, Current Generation.

RDS_MSSQL_LICENSED_STANDARD_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server SE Licensed, On-Demand, Current Generation.

RDS_MSSQL_LICENSED_STANDARD_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ MS SQL Server SE Licensed, On-Demand, Current Generation.

RDS_MSSQL_BYOL_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server BYOL, On-Demand, Current Generation.

RDS_MSSQL_BYOL_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ MS SQL Server BYOL, On-Demand, Current Generation.

RDS_POSTGRESQL_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ Postgres On-Demand, Current Generation.

RDS_POSTGRESQL_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ Postgres, On-Demand, Current Generation.

PG_RDS_MYSQL_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MySQL GPL, On-Demand, Previous Generation.

PG_RDS_MYSQL_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ MySQL GPL, On-Demand, Previous Generation.

PG_RDS_ORACLE_LICENSED_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ Oracle Licensed, On-Demand, Previous Generation.

PG_RDS_ORACLE_LICENSED_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ Oracle Licensed, On-Demand, Previous Generation.

PG_RDS_ORACLE_BYOL_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ Oracle BYOL, On-Demand, Previous Generation.

PG_RDS_ORACLE_BYOL_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ Oracle BYOL, On-Demand, Previous Generation.

PG_RDS_MSSQL_LICENSED_EXPRESS_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server Express Licensed, On-Demand, Previous Generation.

PG_RDS_MSSQL_LICENSED_WEB_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server WEB Licensed, On-Demand, Previous Generation.

PG_RDS_MSSQL_LICENSED_STANDARD_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server SE Licensed, On-Demand, Previous Generation.

PG_RDS_MSSQL_LICENSED_STANDARD_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ MS SQL Server SE Licensed, On-Demand, Previous Generation.

PG_RDS_MSSQL_BYOL_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server BYOL, On-Demand, Previous Generation.

PG_RDS_MSSQL_BYOL_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ MS SQL Server BYOL, On-Demand, Previous Generation.

PG_RDS_POSTGRESQL_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Single AZ Postgres On-Demand, Previous Generation.

PG_RDS_POSTGRESQL_MULTIAZ_ON_DEMAND_URL

str

Undocumented AWS API URL - RDS Multi AZ Postgres, On-Demand, Previous Generation.

RDS_MYSQL_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ MySQL GPL, Reserved, Current Generation.

RDS_MYSQL_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ MySQL GPL, Reserved, Current Generation.

RDS_ORACLE_LICENSED_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ Oracle Licensed, Reserved, Current Generation.

RDS_ORACLE_LICENSED_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ Oracle Licensed, Reserved, Current Generation.

RDS_ORACLE_BYOL_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ Oracle BYOL, Reserved, Current Generation.

RDS_ORACLE_BYOL_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ Oracle BYOL, Reserved, Current Generation.

RDS_MSSQL_LICENSED_EX_RESERVED_LIGHT_URL

str

Undocumented AWS API URL - RDS MS SQL Server Express Licensed, Reserved Light, Current Generation.

RDS_MSSQL_LICENSED_EX_RESERVED_MEDIUM_URL

str

Undocumented AWS API URL - RDS MS SQL Server Express Licensed, Reserved Medium, Current Generation.

RDS_MSSQL_LICENSED_EX_RESERVED_HEAVY_URL

str

Undocumented AWS API URL - RDS MS SQL Server Express Licensed, Reserved Heavy, Current Generation.

RDS_MSSQL_LICENSED_WEB_RESERVED_LIGHT_URL

str

Undocumented AWS API URL - RDS MS SQL Server WEB Licensed, Reserved Light, Current Generation.

RDS_MSSQL_LICENSED_WEB_RESERVED_MEDIUM_URL

str

Undocumented AWS API URL - RDS MS SQL Server WEB Licensed, Reserved Medium, Current Generation.

RDS_MSSQL_LICENSED_WEB_RESERVED_HEAVY_URL

str

Undocumented AWS API URL - RDS MS SQL Server WEB Licensed, Reserved Heavy, Current Generation.

RDS_MSSQL_LICENSED_STANDARD_RESERVED_LIGHT_URL

str

Undocumented AWS API URL - RDS MS SQL Server SE Licensed, Reserved Light, Current Generation.

RDS_MSSQL_LICENSED_STANDARD_RESERVED_MEDIUM_URL

str

Undocumented AWS API URL - RDS MS SQL Server SE Licensed, Reserved Medium, Current Generation.

RDS_MSSQL_LICENSED_STANDARD_RESERVED_HEAVY_URL

str

Undocumented AWS API URL - RDS MS SQL Server SE Licensed, Reserved Heavy, Current Generation.

RDS_MSSQL_BYOL_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server BYOL, Reserved, Current Generation.

RDS_MSSQL_BYOL_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ MS SQL Server BYOL, Reserved, Current Generation.

RDS_POSTGRESQL_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ Postgres, Reserved, Current Generation.

RDS_POSTGRESQL_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ Postgres, Reserved, Current Generation.

PG_RDS_MYSQL_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ MySQL GPL, Reserved, Previous Generation.

PG_RDS_MYSQL_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ MySQL GPL, Reserved, Previous Generation.

PG_RDS_ORACLE_LICENSED_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ Oracle Licensed, Reserved, Previous Generation.

PG_RDS_ORACLE_LICENSED_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ Oracle Licensed, Reserved, Previous Generation.

PG_RDS_ORACLE_BYOL_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ Oracle BYOL, Reserved, Previous Generation.

PG_RDS_ORACLE_BYOL_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ Oracle BYOL, Reserved, Previous Generation.

PG_RDS_MSSQL_LICENSED_EX_RESERVED_LIGHT_URL

str

Undocumented AWS API URL - RDS MS SQL Server Express Licensed, Reserved Light, Previous Generation.

PG_RDS_MSSQL_LICENSED_EX_RESERVED_MEDIUM_URL

str

Undocumented AWS API URL - RDS MS SQL Server Express Licensed, Reserved Medium, Previous Generation.

PG_RDS_MSSQL_LICENSED_EX_RESERVED_HEAVY_URL

str

Undocumented AWS API URL - RDS MS SQL Server Express Licensed, Reserved Heavy, Previous Generation.

PG_RDS_MSSQL_LICENSED_WEB_RESERVED_LIGHT_URL

str

Undocumented AWS API URL - RDS MS SQL Server WEB Licensed, Reserved Light, Previous Generation.

PG_RDS_MSSQL_LICENSED_WEB_RESERVED_MEDIUM_URL

str

Undocumented AWS API URL - RDS MS SQL Server WEB Licensed, Reserved Medium, Previous Generation.

PG_RDS_MSSQL_LICENSED_WEB_RESERVED_HEAVY_URL

str

Undocumented AWS API URL - RDS MS SQL Server WEB Licensed, Reserved Heavy, Previous Generation.

PG_RDS_MSSQL_LICENSED_STANDARD_RESERVED_LIGHT_URL

str

Undocumented AWS API URL - RDS MS SQL Server SE Licensed, Reserved Light, Previous Generation.

PG_RDS_MSSQL_LICENSED_STANDARD_RESERVED_MEDIUM_URL

str

Undocumented AWS API URL - RDS MS SQL Server SE Licensed, Reserved Medium, Previous Generation.

PG_RDS_MSSQL_LICENSED_STANDARD_RESERVED_HEAVY_URL

str

Undocumented AWS API URL - RDS MS SQL Server SE Licensed, Reserved Heavy, Previous Generation.

PG_RDS_MSSQL_BYOL_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ MS SQL Server BYOL, Reserved, Previous Generation.

PG_RDS_MSSQL_BYOL_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ MS SQL Server BYOL, Reserved, Previous Generation.

PG_RDS_POSTGRESQL_RESERVED_URL

str

Undocumented AWS API URL - RDS Single AZ Postgres, Reserved, Previous Generation.

PG_RDS_POSTGRESQL_MULTIAZ_RESERVED_URL

str

Undocumented AWS API URL - RDS Multi AZ Postgres, Reserved, Previous Generation.

RDS_ENGINE_TYPES

list of str

List of RDS engines.

RDS_MULTIAZ_TYPES

list of str

List of RDS Multi-AZ options.

RDS_MULTIAZ_MAPPING

dict of str: str

Mapping of internal AWS RDS Family names to the cvonventional Multi-AZ tag.

RDS_ONDEMAND_TYPE_BY_URL

dict of str: list of str

Mapping of AWS RDS URLs (On-Demand, Single AZ) to corresponding engine and license type.

RDS_ONDEMAND_MULTIAZ_TYPE_BY_URL

dict of str: list of str

Mapping of AWS RDS URLs (On-Demand, Multi AZ) to corresponding engine and license type.

RDS_RESERVED_TYPE_BY_URL_NEW

dict of str: list of str

Mapping of AWS RDS URLs (Reserved, Single AZ, New Pricing Scheme) to corresponding engine and license type.

RDS_RESERVED_MULTIAZ_TYPE_BY_URL_NEW

dict of str: list of str

Mapping of AWS RDS URLs (Reserved, Multi AZ, New Pricing Scheme) to corresponding engine and license type.

RDS_RESERVED_TYPE_BY_URL_OLD

dict of str: list of str

Mapping of AWS RDS URLs (Reserved, Old Pricing Scheme) to corresponding engine and license type.

INSTANCE_TYPE_MAPPING

dict of str: str

Mapping of internal AWS RDS Type names to the cvonventional analogs.

get_ondemand_instances_prices()

Implementation of method for getting RDS On-Denand pricing.

Returns:result – RDS On-Denand pricing in dictionary format.
Return type:dict of dict: dict
get_reserved_instances_prices()

Implementation of method for getting RDS Reserved pricing.

Returns:result – RDS Reserved pricing in dictionary format.
Return type:dict of dict: dict
print_table(u)
Method printing the RDS pricing data to the console
in the Pretty Table format (requires Pretty Table import).
Parameters:u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
Returns:Prints RDS pricing in the Pretty Table format.
save_csv(u, path='C:\\Users\\isemenov\\workspace\\awspricingfull\\docs\\', name=None)
Method saving the RDS pricing data in CSV format to the
cpecified location.
Parameters:
  • u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
  • path (str) – System path for saving the data file. Current directory is the the defauilt value.
  • name (str) – The desired name of the file. The default values are “RDS_reserved_pricing.csv” for Reserved and “RDS_ondemand_pricing.csv” for On-Demand.
Returns:

Prints RDS pricing in the CSV format (console).

class awspricingfull.RSPrices

Bases: awspricingfull.AWSPrices

Class for retrieving the Redshift pricing. Child of awspricingfull.AWSPrices class.

RS_ON_DEMAND_URL

str

Undocumented AWS Pricing API URL - On-Demand Redshift Nodes

PG_RS_ON_DEMAND_URL

str

Undocumented AWS Pricing API URL - Reserved Redshift Nodes, Previous Generation

RS_RESERVED_URL

str

Undocumented AWS Pricing API URL - Reserved Redshift Nodes

PG_RS_RESERVED_URL

str

Undocumented AWS Pricing API URL - Reserved Redshift Nodes, Previous Generation

get_ondemand_instances_prices()

Implementation of method for getting Redshift On-Denand pricing.

Returns:result – Redshift On-Denand pricing in dictionary format.
Return type:dict of dict: dict
get_reserved_instances_prices()

Implementation of method for getting Redshift Reserved pricing.

Returns:result – Redshift Reserved pricing in dictionary format.
Return type:dict of dict: dict
print_table(u)
Method printing the Redshift pricing data to the console
in the Pretty Table format (requires Pretty Table import).
Parameters:u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
Returns:Prints Redshift pricing in the Pretty Table format.
save_csv(u, path='C:\\Users\\isemenov\\workspace\\awspricingfull\\docs\\', name=None)
Method saving the Redshift pricing data in CSV format to the
cpecified location.
Parameters:
  • u (str) – Parameter specifying On-Demand (“ondemand”) or Reserved (“reserved”) pricing option.
  • path (str) – System path for saving the data file. Current directory is the the defauilt value.
  • name (str) – The desired name of the file. The default values are “Redshift_reserved_pricing.csv” for Reserved and “Redshift_ondemand_pricing.csv” for On-Demand.
Returns:

Prints Redshift pricing in the CSV format (console).

This Page