describe_reserved_instances_offerings ( $opt )

The DescribeReservedInstancesOfferings operation describes Reserved Instance offerings that are available for purchase. With Amazon EC2 Reserved Instances, you purchase the right to launch Amazon EC2 instances for a period of time (without getting insufficient capacity errors) and pay a lower usage rate for the actual time used.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • ReservedInstancesOfferingId - string|array - Optional - An optional list of the unique IDs of the Reserved Instance offerings to describe. Pass a string for a single value, or an indexed array for multiple values.
  • InstanceType - string - Optional - The instance type on which the Reserved Instance can be used. [Allowed values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, m3.xlarge, m3.2xlarge, c1.medium, c1.xlarge, hi1.4xlarge, hs1.8xlarge, cc1.4xlarge, cc2.8xlarge, cg1.4xlarge]
  • AvailabilityZone - string - Optional - The Availability Zone in which the Reserved Instance can be used.
  • ProductDescription - string - Optional - The Reserved Instance product description.
  • Filter - array - Optional - A list of filters used to match properties for ReservedInstancesOfferings. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference.
    • x - array - Optional - This represents a simple array index.
      • Name - string - Optional - Specifies the name of the filter.
      • Value - string|array - Optional - Contains one or more values for the filter. Pass a string for a single value, or an indexed array for multiple values.
  • InstanceTenancy - string - Optional - The tenancy of the Reserved Instance offering. A Reserved Instance with tenancy of dedicated will run on single-tenant hardware and can only be launched within a VPC.
  • OfferingType - string - Optional - The Reserved Instance offering type.
  • NextToken - string - Optional -
  • MaxResults - integer - Optional -
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Describe reserved instances offerings.

$ec2 = new AmazonEC2();

$response = $ec2->describe_reserved_instances_offerings(array(
	'AvailabilityZone' => 'us-east-1a',
	'InstanceType' => 'c1.medium'
));

var_dump($response->isOK());
Result:
bool(true)

Filter Reserved Instances Offerings

$ec2 = new AmazonEC2();

$response = $ec2->describe_reserved_instances_offerings(array(
	'Filter' => array(
		array('Name' => 'duration',            'Value' => strtotime('1 year')),
		array('Name' => 'product-description', 'Value' => 'Linux/UNIX'       ),
	)
));

var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/ec2.class.php | Toggle source view (24 lines) | View on GitHub

public function describe_reserved_instances_offerings($opt = null)
{
    if (!$opt) $opt = array();
            
    // Optional list (non-map)
    if (isset($opt['ReservedInstancesOfferingId']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'ReservedInstancesOfferingId' => (is_array($opt['ReservedInstancesOfferingId']) ? $opt['ReservedInstancesOfferingId'] : array($opt['ReservedInstancesOfferingId']))
        )));
        unset($opt['ReservedInstancesOfferingId']);
    }
    
    // Optional list + map
    if (isset($opt['Filter']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'Filter' => $opt['Filter']
        )));
        unset($opt['Filter']);
    }

    return $this->authenticate('DescribeReservedInstancesOfferings', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback