Skip to content

describe_spot_price_history

Operation

describe_spot_price_history

describe_spot_price_history(request: DescribeSpotPriceHistoryInput | DescribeSpotPriceHistoryInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DescribeSpotPriceHistoryInputDict]) -> DescribeSpotPriceHistoryOutput

Describes the Spot price history. For more information, see Spot Instance pricing history in the Amazon EC2 User Guide.

When you specify a start and end time, the operation returns the prices of the instance types within that time range. It also returns the last price change before the start time, which is the effective price as of the start time.

Parameters:

Name Type Description Default
request DescribeSpotPriceHistoryInput | DescribeSpotPriceHistoryInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DescribeSpotPriceHistoryInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DescribeSpotPriceHistoryOutput

An instance of DescribeSpotPriceHistoryOutput.

describe_spot_price_history async

describe_spot_price_history(request: DescribeSpotPriceHistoryInput | DescribeSpotPriceHistoryInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DescribeSpotPriceHistoryInputDict]) -> DescribeSpotPriceHistoryOutput

Describes the Spot price history. For more information, see Spot Instance pricing history in the Amazon EC2 User Guide.

When you specify a start and end time, the operation returns the prices of the instance types within that time range. It also returns the last price change before the start time, which is the effective price as of the start time.

Parameters:

Name Type Description Default
request DescribeSpotPriceHistoryInput | DescribeSpotPriceHistoryInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DescribeSpotPriceHistoryInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DescribeSpotPriceHistoryOutput

An instance of DescribeSpotPriceHistoryOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

DescribeSpotPriceHistoryInputDict

Bases: TypedDict

Dictionary form of DescribeSpotPriceHistoryInput.

Attributes

availability_zone instance-attribute
availability_zone: str | None

Filters the results by the specified Availability Zone.

Either AvailabilityZone or AvailabilityZoneId can be specified, but not both

availability_zone_id instance-attribute
availability_zone_id: str | None

Filters the results by the specified ID of the Availability Zone.

Either AvailabilityZone or AvailabilityZoneId can be specified, but not both

dry_run instance-attribute
dry_run: bool | None

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

end_time instance-attribute
end_time: datetime | None

The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

filters instance-attribute
filters: Sequence[Filter | FilterDict] | None

The filters.

  • availability-zone - The Availability Zone for which prices should be returned.

  • availability-zone-id - The ID of the Availability Zone for which prices should be returned.

  • instance-type - The type of instance (for example, m3.medium).

  • product-description - The product description for the Spot price (Linux/UNIX | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)).

  • spot-price - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

  • timestamp - The time stamp of the Spot price history, in UTC format (for example, ddd MMM dd HH:mm:ss UTC YYYY). You can use wildcards (* and ?). Greater than or less than comparison is not supported.

instance_types instance-attribute
instance_types: Sequence[str] | None

Filters the results by the specified instance types.

max_results instance-attribute
max_results: int | None

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

next_token instance-attribute
next_token: str | None

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

product_descriptions instance-attribute
product_descriptions: Sequence[str] | None

Filters the results by the specified basic product descriptions.

start_time instance-attribute
start_time: datetime | None

The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

DescribeSpotPriceHistoryInput dataclass

Bases: _SerdeShape

Contains the parameters for DescribeSpotPriceHistory.

Attributes

availability_zone class-attribute instance-attribute
availability_zone: str | None = ...

Filters the results by the specified Availability Zone.

Either AvailabilityZone or AvailabilityZoneId can be specified, but not both

availability_zone_id class-attribute instance-attribute
availability_zone_id: str | None = ...

Filters the results by the specified ID of the Availability Zone.

Either AvailabilityZone or AvailabilityZoneId can be specified, but not both

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

end_time class-attribute instance-attribute
end_time: datetime | None = ...

The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

filters class-attribute instance-attribute
filters: list[Filter] | None = ...

The filters.

  • availability-zone - The Availability Zone for which prices should be returned.

  • availability-zone-id - The ID of the Availability Zone for which prices should be returned.

  • instance-type - The type of instance (for example, m3.medium).

  • product-description - The product description for the Spot price (Linux/UNIX | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)).

  • spot-price - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

  • timestamp - The time stamp of the Spot price history, in UTC format (for example, ddd MMM dd HH:mm:ss UTC YYYY). You can use wildcards (* and ?). Greater than or less than comparison is not supported.

instance_types class-attribute instance-attribute
instance_types: list[str] | None = ...

Filters the results by the specified instance types.

max_results class-attribute instance-attribute
max_results: int | None = ...

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

next_token class-attribute instance-attribute
next_token: str | None = ...

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

product_descriptions class-attribute instance-attribute
product_descriptions: list[str] | None = ...

Filters the results by the specified basic product descriptions.

start_time class-attribute instance-attribute
start_time: datetime | None = ...

The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Output

DescribeSpotPriceHistoryOutput dataclass

Bases: _SerdeShape

Contains the output of DescribeSpotPriceHistory.

Attributes

next_token class-attribute instance-attribute
next_token: str | None = ...

The token to include in another request to get the next page of items. This value is an empty string ("") or null when there are no more items to return.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

spot_price_history class-attribute instance-attribute
spot_price_history: list[SpotPrice] | None = ...

The historical Spot prices.