Describes one or more of your instances.

Request Parameters#

  • Filter.N — Filter by instance parameters.

    • Type: List of Filter objects

    • Required: No

  • InstanceId.N — The IDs of the instances.

    • Type: Array of strings

    • Required: No

Supported Filters#

  • affinity — The rule to restart an instance (default | host). When an instance is restarted with the default rule, it can be lanched on any host. When an instance is restarted with the host rule, it can be launched only on the host where it was started earlier.

  • availability-zone — The name of the availability zone.

  • host-id — The dedicated host ID.

  • image-id — The image ID.

  • instance-id — The ID of the instance.

  • instance-state-code — The state of the instance, as a 16-bit unsigned integer (0 — pending | 16 — running | 32 — shutting-down | 48 — terminated | 64 — stopping | 80 — stopped).

  • instance-state-name — The state of the instance.

  • instance-type — The type of the instance (valid values are specified in the tariff).

  • — The ID of the security group.

  • — The name of the security group.

  • ip-address — The Elastic IP address.

  • monitoring-state — Indicates the monitoring state (disabled | enabled).

  • network-interface.association.public-ip — The Elastic IP address.

  • — The ID of the security group.

  • — The name of the security group.

  • — The ID of the network interface.

  • owner-id — The ID of the project.

  • placement-group-name — The name of the placement group.

  • platform — The platform (generic | redhat).

  • reservation-id — The ID of the instance’s reservation. A reservation ID is created any time you start an instance. The reservation ID matches an instance start request but can be associated with more than one instance if you start multiple instances using the same start request. For example, if you start one instance, you’ll get one reservation ID. If you start ten instances using the same start request, you’ll also get one reservation ID.

  • subnetId — The ID of the subnet.

  • switchId — The ID of the virtual switch.

  • tag-key — The tag key. This filter is used to get instances whose tag has the specified key and any value.

  • tag:<tag-key> — The key/value a pair of a tag. The tag key is passed in the filter name, while the tag value is used as the filter value.

  • tenancy — Placement type (default | host).

  • virtualization-type — The virtualization type (hvm | hvm-legacy).

  • vpc-id — The ID of the VPC.

Response Elements#

  • requestId — The request ID

    • Type: String

  • reservationSet — Information about the reservation.


c2-ec2 DescribeInstances

c2-ec2 DescribeInstances InstanceId.1 i-01234567

c2-ec2 DescribeInstances Filter.1.Name <filter-name> Filter.1.Value.1 <filter-value>

c2-ec2 DescribeInstances Filter.1.Name tag:<tag-key> Filter.1.Value.1 <tag-value>

c2-ec2 DescribeInstances Filter.1.Name tag-key Filter.1.Value.1 <tag-key>