| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Purchases a Reserved Instance for use with your account. With Amazon EC2 Reserved Instances, you obtain a capacity reservation for a certain instance configuration over a specified period of time. You pay a lower usage rate than with On-Demand instances for the time that you actually use the capacity reservation.
Starting with the 2011-11-01 API version, AWS expanded its offering of Amazon EC2 Reserved Instances to address a range of projected instance usage. There are three types of Reserved Instances based on customer utilization levels: Heavy Utilization, Medium Utilization, and Light Utilization.
The Medium Utilization offering type is equivalent to the Reserved Instance offering
available before API version 2011-11-01. If you are using tools that predate the
2011-11-01 API version, ec2-describe-reserved-instances-offerings will
only list information about the Medium Utilization Reserved Instance offering
type.
For information about Reserved Instance pricing tiers, go to Understanding Reserved Instance pricing tiers in the Amazon Elastic Compute Cloud User Guide. For more information about Reserved Instances, go to Reserved Instances also in the Amazon Elastic Compute Cloud User Guide.
You determine the type of the Reserved Instances offerings by including the
optional offeringType parameter when calling
ec2-describe-reserved-instances-offerings. After you've identified
the Reserved Instance with the offering type you want, specify its
ReservedInstancesOfferingId when you call
ec2-purchase-reserved-instances-offering.
Starting with the 2012-08-15 API version, you can also purchase Reserved Instances from the Reserved Instance Marketplace. The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought from third parties through the Reserved Instance Marketplace work like any other Reserved Instances.
By default, with the 2012-08-15 API version,
ec2-describe-reserved-instances-offerings returns information about
Amazon EC2 Reserved Instances available directly from AWS, plus instance offerings
available from third parties, on the Reserved Instance Marketplace. If you are using tools that predate
the 2012-08-15 API version, the
ec2-describe-reserved-instances-offerings action will only list
information about Amazon EC2 Reserved Instances available directly from AWS.
For more information about the Reserved Instance Marketplace, go to Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.
You determine the Reserved Instance Marketplace offerings by specifying true for the
optional includeMarketplace parameter when calling
ec2-describe-reserved-instances-offerings. After you've identified
the Reserved Instance with the offering type you want, specify its
reservedInstancesOfferingId when you call
ec2-purchase-reserved-instances-offering.
The short version of this command is ec2prio.
ec2-purchase-reserved-instances-offering
--offering
offering
--instance-count
count [-l limit-price]
| Name | Description |
|---|---|
|
|
The offering ID of the Reserved Instance to purchase. Type: String Default: None Required: Yes Example: -o 4b2293b4-5813-4cc8-9ce3-1957fexample |
|
|
The number of Reserved Instances to purchase. Type: Integer Default: None Required: Yes Example: -c 5 |
|
|
The maximum price that you are willing to pay. Type: Integer Default: None Required: Yes Example: -c 5 |
| Option | Description |
|---|---|
|
|
Overrides the region specified by the Default: The value of the Example: |
|
|
The uniform resource locator (URL) of the Amazon EC2 web service entry point. Default: The value of the Example: |
|
|
The private key that identifies you to Amazon EC2. For more information, see Tell the Tools Who You Are. Default: The value of the Example: |
|
|
The X.509 certificate that identifies you to Amazon EC2. Default: The value of the Example: |
|
|
The access key ID associated with your AWS account. For more information, see Tell the Tools Who You Are. Default: The value of the Example: Note For more information, see the following section, Deprecated Options. |
|
|
The secret access key associated with your AWS account. Default: The value of the Example: Note For more information, see the following section, Deprecated Options. |
|
|
The AWS delegation token. Default: The value of the environment variable (if set). |
|
|
The connection timeout, in seconds. Example: |
|
|
The request timeout, in seconds. Example: |
|
|
Displays verbose output, including the API request and response on the command line. This is useful if you are building tools to talk directly to our Query API. |
|
|
Includes column headers in the command output. |
|
|
Shows empty columns as |
|
|
Omits tags for tagged resources. |
|
|
Displays internal debugging information. This can assist us when helping you troubleshooting problems. |
|
|
Displays usage information for the command. |
|
|
Reads arguments from standard input. This is useful when piping the output from one command to the input of another. Example: |
For a limited time, you can still use the private key and X.509 certificate instead of your access key ID and secret access key. However, we recommend that you start using your access key ID (-O, --aws-access-key) and secret access key (-W, --aws-secret-key) now, as the private key (-K, --private-key) and X.509 certificate (-C, --cert) won't be supported after the transition period elapses. For more information, see Tell the Tools Who You Are.
| Option | Description |
|---|---|
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
The command returns a table that contains the following information:
RESERVEDINSTANCES identifier
The ID of the purchased Reserved Instances
Amazon EC2 command line tools display errors on stderr.
This example illustrates a purchase of a Reserved Instances offering.
PROMPT>ec2-purchase-reserved-instances-offering --offering 649fd0c8-becc-49d9-b259-fc8e2example --instance-count 3RESERVEDINSTANCES b847fa93-0c31-405b-b745-b6bf0example