> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EC2 Describe Instances

Retrieve information for specified EC2 instances.

**Note**: Recently terminated instances might appear in the returned results.

<Note>
  External Documentation

  To learn more, visit the [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter    | Description                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | AWS Region   | Enter the desired AWS Region.                                                                                                                                                                                                                                                                                                                                                                                                         |
  | Filters      | A JSON array of [filters](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Filtering.html#Filtering_Resources_CLI) to narrow results.<br /><br />Supports filtering by instance attributes like state, type, tags, network configuration, and more.<br /><br />For the complete list of attributes to list by, visit [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html). |
  | Instance IDs | A space-separated list of instance IDs to filter results by.                                                                                                                                                                                                                                                                                                                                                                          |
  | Query        | A JMESPath query to filter results by.                                                                                                                                                                                                                                                                                                                                                                                                |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter                        | Description                                                                                                                                                                                                                                                |
  | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Disable XML To JSON Auto Convert | When checked, XML responses are not automatically converted into JSON format.                                                                                                                                                                              |
  | Dry Run                          | 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. |
  | Max Results                      | The maximum number of results per call (5-1000).<br /><br />**Note**: This parmaeter cannot be used with the `Instance IDs` parameter.                                                                                                                     |
  | Next Token                       | A token from a previous call to retrieve the next page of results.                                                                                                                                                                                         |
</div>

## Example Output

```json theme={"dark"}
{
	"Reservations": [
		{
			"ReservationId": "<string>",
			"OwnerId": "<string>",
			"Groups": [],
			"Instances": [
				{
					"Architecture": "<string>",
					"BlockDeviceMappings": [
						{
							"DeviceName": "<string>",
							"Ebs": {
								"AttachTime": "<string>",
								"DeleteOnTermination": true,
								"Status": "<string>",
								"VolumeId": "<string>"
							}
						}
					],
					"ClientToken": "<string>",
					"EbsOptimized": true,
					"EnaSupport": true,
					"Hypervisor": "<string>",
					"NetworkInterfaces": [
						{
							"Association": {
								"IpOwnerId": "<string>",
								"PublicDnsName": "<string>",
								"PublicIp": "<string>"
							},
							"Attachment": {
								"AttachTime": "<string>",
								"AttachmentId": "<string>",
								"DeleteOnTermination": true,
								"DeviceIndex": 219,
								"Status": "<string>",
								"NetworkCardIndex": 511
							},
							"Description": "<string>",
							"Groups": [
								{
									"GroupId": "<string>",
									"GroupName": "<string>"
								}
							],
							"Ipv6Addresses": [],
							"MacAddress": "<string>",
							"NetworkInterfaceId": "<string>",
							"OwnerId": "<string>",
							"PrivateDnsName": "<string>",
							"PrivateIpAddress": "<string>",
							"PrivateIpAddresses": [
								{
									"Association": {
										"IpOwnerId": "<string>",
										"PublicDnsName": "<string>",
										"PublicIp": "<string>"
									},
									"Primary": true,
									"PrivateDnsName": "<string>",
									"PrivateIpAddress": "<string>"
								}
							],
							"SourceDestCheck": true,
							"Status": "<string>",
							"SubnetId": "<string>",
							"VpcId": "<string>",
							"InterfaceType": "<string>",
							"Operator": {
								"Managed": false
							}
						}
					],
					"RootDeviceName": "<string>",
					"RootDeviceType": "<string>",
					"SecurityGroups": [
						{
							"GroupId": "<string>",
							"GroupName": "<string>"
						}
					],
					"SourceDestCheck": true,
					"StateReason": {
						"Code": "<string>",
						"Message": "<string>"
					},
					"Tags": [
						{
							"Key": "<string>",
							"Value": "<string>"
						}
					],
					"VirtualizationType": "<string>",
					"CpuOptions": {
						"CoreCount": 834,
						"ThreadsPerCore": 969
					},
					"CapacityReservationSpecification": {
						"CapacityReservationPreference": "<string>"
					},
					"HibernationOptions": {
						"Configured": false
					},
					"MetadataOptions": {
						"State": "<string>",
						"HttpTokens": "<string>",
						"HttpPutResponseHopLimit": 616,
						"HttpEndpoint": "<string>",
						"HttpProtocolIpv6": "<string>",
						"InstanceMetadataTags": "<string>"
					},
					"EnclaveOptions": {
						"Enabled": false
					},
					"PlatformDetails": "<string>",
					"UsageOperation": "<string>",
					"UsageOperationUpdateTime": "<string>",
					"PrivateDnsNameOptions": {
						"HostnameType": "<string>",
						"EnableResourceNameDnsARecord": false,
						"EnableResourceNameDnsAAAARecord": false
					},
					"MaintenanceOptions": {
						"AutoRecovery": "<string>"
					},
					"CurrentInstanceBootMode": "<string>",
					"NetworkPerformanceOptions": {
						"BandwidthWeighting": "<string>"
					},
					"Operator": {
						"Managed": false
					},
					"InstanceId": "<string>",
					"ImageId": "<string>",
					"State": {
						"Code": 361,
						"Name": "<string>"
					},
					"PrivateDnsName": "<string>",
					"PublicDnsName": "<string>",
					"StateTransitionReason": "<string>",
					"KeyName": "<string>",
					"AmiLaunchIndex": 329,
					"ProductCodes": [],
					"InstanceType": "<string>",
					"LaunchTime": "<string>",
					"Placement": {
						"GroupName": "<string>",
						"Tenancy": "<string>",
						"AvailabilityZone": "<string>"
					},
					"Platform": "<string>",
					"Monitoring": {
						"State": "<string>"
					},
					"SubnetId": "<string>",
					"VpcId": "<string>",
					"PrivateIpAddress": "<string>",
					"PublicIpAddress": "<string>"
				}
			]
		}
	]
}
```

## Workflow Library Example

[Detect Long Running Aws Ec2 Instances and Send Report to Slack](https://library.blinkops.com/workflows/detect-long-running-aws-ec2-instances-and-send-report-to-slack)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/detect-long-running-aws-ec2-instances-and-send-report-to-slack/canvas" />
</div>
