(self, instance_types, product_descriptions=['Linux/UNIX'])
return response
Returns the spot price history given a specified AZ and region.
Returns the spot price history given a specified AZ and region.
Returns the spot price history given a specified AZ and region .
def get_spot_pricing_history(self, instance_types, product_descriptions=['Linux/UNIX']):
        """ Returns the spot price history given a specified AZ and region."""
        print "Getting spot prices for", self.name

        response = self.client.describe_spot_price_history(
            DryRun=False,
            StartTime=datetime.datetime.now() - datetime.timedelta(days=7),
            EndTime=datetime.datetime.now(),
            InstanceTypes=instance_types,
            AvailabilityZone=self.name,
            ProductDescriptions=product_descriptions)

        self.spot_pricing_history = response.get('SpotPriceHistory', [])
        return response
def get_spot_pricing_history ( self , instance_types , product_descriptions = [ 'Linux/UNIX' ] ) : print "Getting spot prices for" , self . name response = self . client . describe_spot_price_history ( DryRun = False , StartTime = datetime . datetime . now ( ) - datetime . timedelta ( days = 7 ) , EndTime = datetime . datetime . now ( ) , InstanceTypes = instance_types , AvailabilityZone = self . name , ProductDescriptions = product_descriptions ) self . spot_pricing_history = response . get ( 'SpotPriceHistory' , [ ] ) return response