Menu
AWS OpsWorks
API Reference (API Version 2013-02-18)

DescribeInstances

Requests a description of a set of instances.

Note

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Request Syntax

{ "InstanceIds": [ "string" ], "LayerId": "string", "StackId": "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.

InstanceIds

An array of instance IDs to be described. If you use this parameter, DescribeInstances returns a description of the specified instances. Otherwise, it returns a description of every instance.

Type: Array of strings

Required: No

LayerId

A layer ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified layer.

Type: String

Required: No

StackId

A stack ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified stack.

Type: String

Required: No

Response Syntax

{ "Instances": [ { "AgentVersion": "string", "AmiId": "string", "Architecture": "string", "Arn": "string", "AutoScalingType": "string", "AvailabilityZone": "string", "BlockDeviceMappings": [ { "DeviceName": "string", "Ebs": { "DeleteOnTermination": boolean, "Iops": number, "SnapshotId": "string", "VolumeSize": number, "VolumeType": "string" }, "NoDevice": "string", "VirtualName": "string" } ], "CreatedAt": "string", "EbsOptimized": boolean, "Ec2InstanceId": "string", "EcsClusterArn": "string", "EcsContainerInstanceArn": "string", "ElasticIp": "string", "Hostname": "string", "InfrastructureClass": "string", "InstallUpdatesOnBoot": boolean, "InstanceId": "string", "InstanceProfileArn": "string", "InstanceType": "string", "LastServiceErrorId": "string", "LayerIds": [ "string" ], "Os": "string", "Platform": "string", "PrivateDns": "string", "PrivateIp": "string", "PublicDns": "string", "PublicIp": "string", "RegisteredBy": "string", "ReportedAgentVersion": "string", "ReportedOs": { "Family": "string", "Name": "string", "Version": "string" }, "RootDeviceType": "string", "RootDeviceVolumeId": "string", "SecurityGroupIds": [ "string" ], "SshHostDsaKeyFingerprint": "string", "SshHostRsaKeyFingerprint": "string", "SshKeyName": "string", "StackId": "string", "Status": "string", "SubnetId": "string", "Tenancy": "string", "VirtualizationType": "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.

Instances

An array of Instance objects that describe the instances.

Type: Array of Instance objects

Errors

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

ResourceNotFoundException

Indicates that a resource was not found.

HTTP Status Code: 400

ValidationException

Indicates that a request was 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: