The PurchaseReservedInstancesOffering operation purchases a Reserved Instance for use with your account. 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 |
---|---|---|---|
|
Required |
The unique ID of the Reserved Instances offering being purchased. |
|
|
Required |
The number of Reserved Instances to purchase. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Purchase a reserved instances offering.
// Instantiate the class $ec2 = new AmazonEC2(); $response = $ec2->purchase_reserved_instances_offering('438012d3-352b-4361-9d2e-a3166db861b1', 1); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/ec2.class.php | Toggle source view (17 lines) | View on GitHub