Amazon Elastic Compute Cloud

2015/02/10 - Amazon Elastic Compute Cloud - 2 updated api methods

DescribeReservedInstances (updated) Link ¶
Changes (request, response)
Request
{'OfferingType': {'All Upfront', 'Partial Upfront', 'No Upfront'}}
Response
{'ReservedInstances': {'OfferingType': {'All Upfront',
                                        'No Upfront',
                                        'Partial Upfront'}}}

Describes one or more of the Reserved Instances that you purchased.

For more information about Reserved Instances, see Reserved Instances in the Amazon Elastic Compute Cloud User Guide .

Request Syntax

client.describe_reserved_instances(
    DryRun=True|False,
    ReservedInstancesIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront'
)
type DryRun

boolean

param DryRun

type ReservedInstancesIds

list

param ReservedInstancesIds

One or more Reserved Instance IDs.

Default: Describes all your Reserved Instances, or only those otherwise specified.

  • (string) --

type Filters

list

param Filters

One or more filters.

  • availability-zone - The Availability Zone where the Reserved Instance can be used.

  • duration - The duration of the Reserved Instance (one year or three years), in seconds ( 31536000 | 94608000 ).

  • end - The time when the Reserved Instance expires (for example, 2014-08-07T11:54:42.000Z).

  • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).

  • instance-type - The instance type on which the Reserved Instance can be used.

  • product-description - The product description of the Reserved Instance ( Linux/UNIX | Linux/UNIX (Amazon VPC) | Windows | Windows (Amazon VPC) ).

  • reserved-instances-id - The ID of the Reserved Instance.

  • start - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).

  • state - The state of the Reserved Instance ( pending-payment | active | payment-failed | retired ).

  • tag :key =*value* - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag :key =*value* filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type OfferingType

string

param OfferingType

The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.

rtype

dict

returns

Response Syntax

{
    'ReservedInstances': [
        {
            'ReservedInstancesId': 'string',
            'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge',
            'AvailabilityZone': 'string',
            'Start': datetime(2015, 1, 1),
            'End': datetime(2015, 1, 1),
            'Duration': 123,
            'UsagePrice': ...,
            'FixedPrice': ...,
            'InstanceCount': 123,
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'State': 'payment-pending'|'active'|'payment-failed'|'retired',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'InstanceTenancy': 'default'|'dedicated',
            'CurrencyCode': 'USD',
            'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
            'RecurringCharges': [
                {
                    'Frequency': 'Hourly',
                    'Amount': 123.0
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • ReservedInstances (list) --

      A list of Reserved Instances.

      • (dict) --

        Describes a Reserved Instance.

        • ReservedInstancesId (string) --

          The ID of the Reserved Instance.

        • InstanceType (string) --

          The instance type on which the Reserved Instance can be used.

        • AvailabilityZone (string) --

          The Availability Zone in which the Reserved Instance can be used.

        • Start (datetime) --

          The date and time the Reserved Instance started.

        • End (datetime) --

          The time when the Reserved Instance expires.

        • Duration (integer) --

          The duration of the Reserved Instance, in seconds.

        • UsagePrice (float) --

          The usage price of the Reserved Instance, per hour.

        • FixedPrice (float) --

          The purchase price of the Reserved Instance.

        • InstanceCount (integer) --

          The number of Reserved Instances purchased.

        • ProductDescription (string) --

          The Reserved Instance description.

        • State (string) --

          The state of the Reserved Instance purchase.

        • Tags (list) --

          Any tags assigned to the resource.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • InstanceTenancy (string) --

          The tenancy of the reserved instance.

        • CurrencyCode (string) --

          The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD .

        • OfferingType (string) --

          The Reserved Instance offering type.

        • RecurringCharges (list) --

          The recurring charge tag assigned to the resource.

          • (dict) --

            Describes a recurring charge.

            • Frequency (string) --

              The frequency of the recurring charge.

            • Amount (float) --

              The amount of the recurring charge.

DescribeReservedInstancesOfferings (updated) Link ¶
Changes (request, response)
Request
{'OfferingType': {'All Upfront', 'Partial Upfront', 'No Upfront'}}
Response
{'ReservedInstancesOfferings': {'OfferingType': {'All Upfront',
                                                 'No Upfront',
                                                 'Partial Upfront'}}}

Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .

Request Syntax

client.describe_reserved_instances_offerings(
    DryRun=True|False,
    ReservedInstancesOfferingIds=[
        'string',
    ],
    InstanceType='t1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge',
    AvailabilityZone='string',
    ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceTenancy='default'|'dedicated',
    OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
    NextToken='string',
    MaxResults=123,
    IncludeMarketplace=True|False,
    MinDuration=123,
    MaxDuration=123,
    MaxInstanceCount=123
)
type DryRun

boolean

param DryRun

type ReservedInstancesOfferingIds

list

param ReservedInstancesOfferingIds

One or more Reserved Instances offering IDs.

  • (string) --

type InstanceType

string

param InstanceType

The instance type on which the Reserved Instance can be used. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide .

type AvailabilityZone

string

param AvailabilityZone

The Availability Zone in which the Reserved Instance can be used.

type ProductDescription

string

param ProductDescription

The Reserved Instance description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.

type Filters

list

param Filters

One or more filters.

  • availability-zone - The Availability Zone where the Reserved Instance can be used.

  • duration - The duration of the Reserved Instance (for example, one year or three years), in seconds ( 31536000 | 94608000 ).

  • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).

  • instance-type - The instance type on which the Reserved Instance can be used.

  • marketplace - Set to true to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from AWS and Reserved Instance Marketplace are listed.

  • product-description - The description of the Reserved Instance ( Linux/UNIX | Linux/UNIX (Amazon VPC) | Windows | Windows (Amazon VPC) ).

  • reserved-instances-offering-id - The Reserved Instances offering ID.

  • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type InstanceTenancy

string

param InstanceTenancy

The tenancy of the Reserved Instance offering. A Reserved Instance with dedicated tenancy runs on single-tenant hardware and can only be launched within a VPC.

Default: default

type OfferingType

string

param OfferingType

The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.

type NextToken

string

param NextToken

The token to use when requesting the next paginated set of offerings.

type MaxResults

integer

param MaxResults

The maximum number of offerings to return. The maximum is 100.

Default: 100

type IncludeMarketplace

boolean

param IncludeMarketplace

Include Marketplace offerings in the response.

type MinDuration

integer

param MinDuration

The minimum duration (in seconds) to filter when searching for offerings.

Default: 2592000 (1 month)

type MaxDuration

integer

param MaxDuration

The maximum duration (in seconds) to filter when searching for offerings.

Default: 94608000 (3 years)

type MaxInstanceCount

integer

param MaxInstanceCount

The maximum number of instances to filter when searching for offerings.

Default: 20

rtype

dict

returns

Response Syntax

{
    'ReservedInstancesOfferings': [
        {
            'ReservedInstancesOfferingId': 'string',
            'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge',
            'AvailabilityZone': 'string',
            'Duration': 123,
            'UsagePrice': ...,
            'FixedPrice': ...,
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'InstanceTenancy': 'default'|'dedicated',
            'CurrencyCode': 'USD',
            'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
            'RecurringCharges': [
                {
                    'Frequency': 'Hourly',
                    'Amount': 123.0
                },
            ],
            'Marketplace': True|False,
            'PricingDetails': [
                {
                    'Price': 123.0,
                    'Count': 123
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ReservedInstancesOfferings (list) --

      A list of Reserved Instances offerings.

      • (dict) --

        Describes a Reserved Instance offering.

        • ReservedInstancesOfferingId (string) --

          The ID of the Reserved Instance offering.

        • InstanceType (string) --

          The instance type on which the Reserved Instance can be used.

        • AvailabilityZone (string) --

          The Availability Zone in which the Reserved Instance can be used.

        • Duration (integer) --

          The duration of the Reserved Instance, in seconds.

        • UsagePrice (float) --

          The usage price of the Reserved Instance, per hour.

        • FixedPrice (float) --

          The purchase price of the Reserved Instance.

        • ProductDescription (string) --

          The Reserved Instance description.

        • InstanceTenancy (string) --

          The tenancy of the reserved instance.

        • CurrencyCode (string) --

          The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD .

        • OfferingType (string) --

          The Reserved Instance offering type.

        • RecurringCharges (list) --

          The recurring charge tag assigned to the resource.

          • (dict) --

            Describes a recurring charge.

            • Frequency (string) --

              The frequency of the recurring charge.

            • Amount (float) --

              The amount of the recurring charge.

        • Marketplace (boolean) --

          Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, this is true .

        • PricingDetails (list) --

          The pricing details of the Reserved Instance offering.

          • (dict) --

            Describes a Reserved Instance offering.

            • Price (float) --

              The price per instance.

            • Count (integer) --

              The number of instances available for the price.

    • NextToken (string) --

      The next paginated set of results to return.