Menu
AWS Systems Manager
API Reference (API Version 2014-11-06)

DescribeInstanceInformation

Describes one or more of your instances. You can use this to get information about instances like the operating system platform, the SSM Agent version (Linux), status etc. If you specify one or more instance IDs, it returns information for those instances. If you do not specify instance IDs, it returns information for all your instances. If you specify an instance ID that is not valid or an instance that you do not own, you receive an error.

Request Syntax

{
   "Filters": [ 
      { 
         "Key": "string",
         "Values": [ "string" ]
      }
   ],
   "InstanceInformationFilterList": [ 
      { 
         "key": "string",
         "valueSet": [ "string" ]
      }
   ],
   "MaxResults": number,
   "NextToken": "string"
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Filters

One or more filters. Use a filter to return a more specific list of instances.

Type: Array of InstanceInformationStringFilter objects

Array Members: Minimum number of 0 items.

Required: No

InstanceInformationFilterList

One or more filters. Use a filter to return a more specific list of instances.

Type: Array of InstanceInformationFilter objects

Array Members: Minimum number of 0 items.

Required: No

MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Type: Integer

Valid Range: Minimum value of 5. Maximum value of 50.

Required: No

NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Required: No

Response Syntax

{
   "InstanceInformationList": [ 
      { 
         "ActivationId": "string",
         "AgentVersion": "string",
         "AssociationOverview": { 
            "DetailedStatus": "string",
            "InstanceAssociationStatusAggregatedCount": { 
               "string" : number 
            }
         },
         "AssociationStatus": "string",
         "ComputerName": "string",
         "IamRole": "string",
         "InstanceId": "string",
         "IPAddress": "string",
         "IsLatestVersion": boolean,
         "LastAssociationExecutionDate": number,
         "LastPingDateTime": number,
         "LastSuccessfulAssociationExecutionDate": number,
         "Name": "string",
         "PingStatus": "string",
         "PlatformName": "string",
         "PlatformType": "string",
         "PlatformVersion": "string",
         "RegistrationDate": number,
         "ResourceType": "string"
      }
   ],
   "NextToken": "string"
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

InstanceInformationList

The instance information list.

Type: Array of InstanceInformation objects

NextToken

The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerError

An error occurred on the server side.

HTTP Status Code: 400

InvalidFilterKey

The specified key is not valid.

HTTP Status Code: 400

InvalidInstanceId

The following problems can cause this exception:

You do not have permission to access the instance.

The SSM Agent is not running. On managed instances and Linux instances, verify that the SSM Agent is running. On EC2 Windows instances, verify that the EC2Config service is running.

The SSM Agent or EC2Config service is not registered to the SSM endpoint. Try reinstalling the SSM Agent or EC2Config service.

The instance is not in valid state. Valid states are: Running, Pending, Stopped, Stopping. Invalid states are: Shutting-down and Terminated.

HTTP Status Code: 400

InvalidInstanceInformationFilterValue

The specified filter value is not valid.

HTTP Status Code: 400

InvalidNextToken

The specified token is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: