Skip to content

aws.opsworks.describe_instances

Example SQL Queries

SELECT * FROM
aws.opsworks.describe_instances;

Description

Requests a description of a set of instances.

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 about user permissions, see Managing User Permissions.

Table Definition

Column NameColumn Data Type
instance_ids Input Column

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.

VARCHAR[]
Show child fields
instance_ids[]
layer_id Input Column

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

VARCHAR
stack_id Input Column

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

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
instances

An array of Instance objects that describe the instances.

STRUCT(
"agent_version" VARCHAR,
"ami_id" VARCHAR,
"architecture" VARCHAR,
"arn" VARCHAR,
"auto_scaling_type" VARCHAR,
"availability_zone" VARCHAR,
"block_device_mappings" STRUCT(
"device_name" VARCHAR,
"no_device" VARCHAR,
"virtual_name" VARCHAR,
"ebs" STRUCT(
"snapshot_id" VARCHAR,
"iops" BIGINT,
"volume_size" BIGINT,
"volume_type" VARCHAR,
"delete_on_termination" BOOLEAN
)
)[],
"created_at" VARCHAR,
"ebs_optimized" BOOLEAN,
"ec2_instance_id" VARCHAR,
"ecs_cluster_arn" VARCHAR,
"ecs_container_instance_arn" VARCHAR,
"elastic_ip" VARCHAR,
"hostname" VARCHAR,
"infrastructure_class" VARCHAR,
"install_updates_on_boot" BOOLEAN,
"instance_id" VARCHAR,
"instance_profile_arn" VARCHAR,
"instance_type" VARCHAR,
"last_service_error_id" VARCHAR,
"layer_ids" VARCHAR[],
"os" VARCHAR,
"platform" VARCHAR,
"private_dns" VARCHAR,
"private_ip" VARCHAR,
"public_dns" VARCHAR,
"public_ip" VARCHAR,
"registered_by" VARCHAR,
"reported_agent_version" VARCHAR,
"reported_os" STRUCT(
"family" VARCHAR,
"name" VARCHAR,
"version" VARCHAR
),
"root_device_type" VARCHAR,
"root_device_volume_id" VARCHAR,
"security_group_ids" VARCHAR[],
"ssh_host_dsa_key_fingerprint" VARCHAR,
"ssh_host_rsa_key_fingerprint" VARCHAR,
"ssh_key_name" VARCHAR,
"stack_id" VARCHAR,
"status" VARCHAR,
"subnet_id" VARCHAR,
"tenancy" VARCHAR,
"virtualization_type" VARCHAR
)[]
Show child fields
instances[]
Show child fields
instances[].agent_version

The agent version. This parameter is set to INHERIT if the instance inherits the default stack setting or to a a version number for a fixed agent version.

instances[].ami_id

A custom AMI ID to be used to create the instance. For more information, see Instances

instances[].architecture

The instance architecture: "i386" or "x86_64".

instances[].arn

The instance's Amazon Resource Number (ARN).

instances[].auto_scaling_type

For load-based or time-based instances, the type.

instances[].availability_zone

The instance Availability Zone. For more information, see Regions and Endpoints.

instances[].block_device_mappings[]
Show child fields
instances[].block_device_mappings[].device_name

The device name that is exposed to the instance, such as /dev/sdh. For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

instances[].block_device_mappings[].ebs

An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.

Show child fields
instances[].block_device_mappings[].ebs.delete_on_termination

Whether the volume is deleted on instance termination.

instances[].block_device_mappings[].ebs.iops

The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice.

instances[].block_device_mappings[].ebs.snapshot_id

The snapshot ID.

instances[].block_device_mappings[].ebs.volume_size

The volume size, in GiB. For more information, see EbsBlockDevice.

instances[].block_device_mappings[].ebs.volume_type

The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes.

If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. Amazon Web Services uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

instances[].block_device_mappings[].no_device

Suppresses the specified device included in the AMI's block device mapping.

instances[].block_device_mappings[].virtual_name

The virtual device name. For more information, see BlockDeviceMapping.

instances[].created_at

The time that the instance was created.

instances[].ebs_optimized

Whether this is an Amazon EBS-optimized instance.

instances[].ec2_instance_id

The ID of the associated Amazon EC2 instance.

instances[].ecs_cluster_arn

For container instances, the Amazon ECS cluster's ARN.

instances[].ecs_container_instance_arn

For container instances, the instance's ARN.

instances[].elastic_ip

The instance Elastic IP address.

instances[].hostname

The instance host name. The following are character limits for instance host names.

  • Linux-based instances: 63 characters

  • Windows-based instances: 15 characters

instances[].infrastructure_class

For registered instances, the infrastructure class: ec2 or on-premises.

instances[].install_updates_on_boot

Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must update instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

We strongly recommend using the default value of true to ensure that your instances have the latest security updates.

instances[].instance_id

The instance ID.

instances[].instance_profile_arn

The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

instances[].instance_type

The instance type, such as t2.micro.

instances[].last_service_error_id

The ID of the last service error. For more information, call DescribeServiceErrors.

instances[].layer_ids[]
instances[].os

The instance's operating system.

instances[].platform

The instance's platform.

instances[].private_dns

The instance's private DNS name.

instances[].private_ip

The instance's private IP address.

instances[].public_dns

The instance public DNS name.

instances[].public_ip

The instance public IP address.

instances[].registered_by

For registered instances, who performed the registration.

instances[].reported_agent_version

The instance's reported OpsWorks Stacks agent version.

instances[].reported_os

For registered instances, the reported operating system.

Show child fields
instances[].reported_os.family

The operating system family.

instances[].reported_os.name

The operating system name.

instances[].reported_os.version

The operating system version.

instances[].root_device_type

The instance's root device type. For more information, see Storage for the Root Device.

instances[].root_device_volume_id

The root device volume ID.

instances[].security_group_ids[]
instances[].ssh_host_dsa_key_fingerprint

The SSH key's Deep Security Agent (DSA) fingerprint.

instances[].ssh_host_rsa_key_fingerprint

The SSH key's RSA fingerprint.

instances[].ssh_key_name

The instance's Amazon EC2 key-pair name.

instances[].stack_id

The stack ID.

instances[].status

The instance status:

  • booting

  • connection_lost

  • online

  • pending

  • rebooting

  • requested

  • running_setup

  • setup_failed

  • shutting_down

  • start_failed

  • stop_failed

  • stopped

  • stopping

  • terminated

  • terminating

instances[].subnet_id

The instance's subnet ID; applicable only if the stack is running in a VPC.

instances[].tenancy

The instance's tenancy option, such as dedicated or host.

instances[].virtualization_type

The instance's virtualization type: paravirtual or hvm.