(price_object, recorded_minute)
return (key, int(recorded_minute.timestamp), price_object["SpotPrice"])
Get price data in the format expected by the metrics client.

    :param price_object: dict of price data returned by EC2.
    :param recorded_minute: The minute the data should be recorded for, as an arrow object.
Get price data in the format expected by the metrics client.
Get price data in the format expected by the metrics client .
def get_data_for_price(price_object, recorded_minute):
    """
    Get price data in the format expected by the metrics client.

    :param price_object: dict of price data returned by EC2.
    :param recorded_minute: The minute the data should be recorded for, as an arrow object.
    """
    dimensions = {
        "aws_instance_type": price_object["InstanceType"],
        "aws_availability_zone": price_object["AvailabilityZone"],
    }
    key = generate_key_with_dimensions("spot_prices", dimensions=dimensions)
    return (key, int(recorded_minute.timestamp), price_object["SpotPrice"])
def get_data_for_price ( price_object , recorded_minute ) : dimensions = { "aws_instance_type" : price_object [ "InstanceType" ] , "aws_availability_zone" : price_object [ "AvailabilityZone" ] , } key = generate_key_with_dimensions ( "spot_prices" , dimensions = dimensions ) return ( key , int ( recorded_minute . timestamp ) , price_object [ "SpotPrice" ] )