Amazon Elastic Compute Cloud

2025/10/28 - Amazon Elastic Compute Cloud - 1 new api methods

Changes  This released the DescribeCapacityReservationTopology API.

DescribeCapacityReservationTopology (new) Link ΒΆ

Describes a tree-based hierarchy that represents the physical host placement of your pending or active Capacity Reservations within an Availability Zone or Local Zone. You can use this information to determine the relative proximity of your capacity within the Amazon Web Services network before it is launched and use this information to allocate capacity together to support your tightly coupled workloads.

Capacity Reservation topology is supported for specific instance types only. For more information, see Prerequisites for Amazon EC2 instance topology in the Amazon EC2 User Guide.

For more information, see Amazon EC2 topology in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

client.describe_capacity_reservation_topology(
    DryRun=True|False,
    NextToken='string',
    MaxResults=123,
    CapacityReservationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
type DryRun:

boolean

param DryRun:

Checks whether you have the required permissions for the operation, 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.

type NextToken:

string

param NextToken:

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

type MaxResults:

integer

param MaxResults:

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.

You can't specify this parameter and the Capacity Reservation IDs parameter in the same request.

Default: 10

type CapacityReservationIds:

list

param CapacityReservationIds:

The Capacity Reservation IDs.

Default: Describes all your Capacity Reservations.

Constraints: Maximum 100 explicitly specified Capacity Reservation IDs.

  • (string) --

type Filters:

list

param Filters:

The filters.

  • availability-zone - The name of the Availability Zone (for example, us-west-2a) or Local Zone (for example, us-west-2-lax-1b) that the Capacity Reservation is in.

  • instance-type - The instance type (for example, p4d.24xlarge) or instance family (for example, p4d*). You can use the * wildcard to match zero or more characters, or the ? wildcard to match zero or one character.

  • (dict) --

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

    If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (string) --

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'CapacityReservations': [
        {
            'CapacityReservationId': 'string',
            'CapacityBlockId': 'string',
            'State': 'string',
            'InstanceType': 'string',
            'GroupName': 'string',
            'NetworkNodes': [
                'string',
            ],
            'AvailabilityZoneId': 'string',
            'AvailabilityZone': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      The token to include in another request to get the next page of items. This value is null when there are no more items to return.

    • CapacityReservations (list) --

      Information about the topology of each Capacity Reservation.

      • (dict) --

        Information about the Capacity Reservation topology.

        • CapacityReservationId (string) --

          The ID of the Capacity Reservation.

        • CapacityBlockId (string) --

          The ID of the Capacity Block. This parameter is only supported for UltraServer instances and identifies instances within the UltraServer domain.

        • State (string) --

          The current state of the Capacity Reservation. For the list of possible states, see DescribeCapacityReservations.

        • InstanceType (string) --

          The instance type.

        • GroupName (string) --

          The name of the placement group that the Capacity Reservation is in.

        • NetworkNodes (list) --

          The network nodes. The nodes are hashed based on your account. Capacity Reservations from different accounts running under the same server will return a different hashed list of strings.

          The value is null or empty if:

          • The instance type is not supported.

          • The Capacity Reservation is in a state other than active or pending.

          • (string) --

        • AvailabilityZoneId (string) --

          The ID of the Availability Zone or Local Zone that the Capacity Reservation is in.

        • AvailabilityZone (string) --

          The name of the Availability Zone or Local Zone that the Capacity Reservation is in.