Skip to content

aws.snow_device_management.describe_device_ec2_instances

Example SQL Queries

SELECT * FROM
aws.snow_device_management.describe_device_ec2_instances
WHERE
"instance_ids" = 'VALUE'
AND "managed_device_id" = 'VALUE';

Description

Checks the current state of the Amazon EC2 instances. The output is similar to describeDevice, but the results are sourced from the device cache in the Amazon Web Services Cloud and include a subset of the available fields.

Table Definition

Column NameColumn Data Type
instance_ids Required Input Column

A list of instance IDs associated with the managed device.

VARCHAR[]
Show child fields
instance_ids[]
managed_device_id Required Input Column

The ID of the managed device.

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.

instances

A list of structures containing information about each instance.

STRUCT(
"instance" STRUCT(
"ami_launch_index" BIGINT,
"block_device_mappings" STRUCT(
"device_name" VARCHAR,
"ebs" STRUCT(
"attach_time" TIMESTAMP_S,
"delete_on_termination" BOOLEAN,
"status" VARCHAR,
"volume_id" VARCHAR
)
)[],
"cpu_options" STRUCT(
"core_count" BIGINT,
"threads_per_core" BIGINT
),
"created_at" TIMESTAMP_S,
"image_id" VARCHAR,
"instance_id" VARCHAR,
"instance_type" VARCHAR,
"private_ip_address" VARCHAR,
"public_ip_address" VARCHAR,
"root_device_name" VARCHAR,
"security_groups" STRUCT(
"group_id" VARCHAR,
"group_name" VARCHAR
)[],
"state" STRUCT(
"code" BIGINT,
"name" VARCHAR
),
"updated_at" TIMESTAMP_S
),
"last_updated_at" TIMESTAMP_S
)[]
Show child fields
instances[]
Show child fields
instances[].instance

A structure containing details about the instance.

Show child fields
instances[].instance.ami_launch_index

The Amazon Machine Image (AMI) launch index, which you can use to find this instance in the launch group.

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

The block device name.

instances[].instance.block_device_mappings[].ebs

The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS) volumes when the instance is launched.

Show child fields
instances[].instance.block_device_mappings[].ebs.attach_time

When the attachment was initiated.

instances[].instance.block_device_mappings[].ebs.delete_on_termination

A value that indicates whether the volume is deleted on instance termination.

instances[].instance.block_device_mappings[].ebs.status

The attachment state.

instances[].instance.block_device_mappings[].ebs.volume_id

The ID of the Amazon EBS volume.

instances[].instance.cpu_options

The CPU options for the instance.

Show child fields
instances[].instance.cpu_options.core_count

The number of cores that the CPU can use.

instances[].instance.cpu_options.threads_per_core

The number of threads per core in the CPU.

instances[].instance.created_at

When the instance was created.

instances[].instance.image_id

The ID of the AMI used to launch the instance.

instances[].instance.instance_id

The ID of the instance.

instances[].instance.instance_type

The instance type.

instances[].instance.private_ip_address

The private IPv4 address assigned to the instance.

instances[].instance.public_ip_address

The public IPv4 address assigned to the instance.

instances[].instance.root_device_name

The device name of the root device volume (for example, /dev/sda1).

instances[].instance.security_groups[]
Show child fields
instances[].instance.security_groups[].group_id

The security group ID.

instances[].instance.security_groups[].group_name

The security group name.

instances[].instance.state

The description of the current state of an instance.

Show child fields
instances[].instance.state.code

The state of the instance as a 16-bit unsigned integer.

The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

The valid values for the instance state code are all in the range of the low byte. These values are:

  • 0 : pending

  • 16 : running

  • 32 : shutting-down

  • 48 : terminated

  • 64 : stopping

  • 80 : stopped

You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

instances[].instance.state.name

The current state of the instance.

instances[].instance.updated_at

When the instance was last updated.

instances[].last_updated_at

When the instance summary was last updated.