Skip to content

EC2  >  Operations  >  describe_host_reservations

describe_host_reservations

Operation

describe_host_reservations async

describe_host_reservations(request: DescribeHostReservationsInput | DescribeHostReservationsInputDict, /, *, plugins: list[Plugin] | None = None) -> DescribeHostReservationsOutput
describe_host_reservations(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[DescribeHostReservationsInputDict]) -> DescribeHostReservationsOutput

Describes reservations that are associated with Dedicated Hosts in your account.

Parameters:

Name Type Description Default
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

Returns:

Type Description
DescribeHostReservationsOutput

An instance of DescribeHostReservationsOutput.

Input

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

Model

DescribeHostReservationsInput dataclass

Bases: _SerdeShape

Dataclass for DescribeHostReservationsInput structure.

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

The filters.

  • instance-family - The instance family (for example, m4).

  • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront).

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

  • tag:``<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

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

The host reservation IDs.

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

The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

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

The token to use to retrieve the next page of results.

Dictionaries

DescribeHostReservationsInputDict

Bases: TypedDict

Dictionary form of DescribeHostReservationsInput.

Attributes
filter instance-attribute
filter: Sequence[Filter | FilterDict] | None

The filters.

  • instance-family - The instance family (for example, m4).

  • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront).

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

  • tag:``<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

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

The host reservation IDs.

max_results instance-attribute
max_results: int | None

The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

next_token instance-attribute
next_token: str | None

The token to use to retrieve the next page of results.

Output

DescribeHostReservationsOutput dataclass

Bases: _SerdeShape

Dataclass for DescribeHostReservationsOutput structure.

Attributes

host_reservation_set class-attribute instance-attribute
host_reservation_set: list[HostReservation] | None = ...

Details about the reservation's configuration.

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

The token to use to retrieve the next page of results. This value is null when there are no more results 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.