Skip to content

aws.ec2.describe_volumes

Example SQL Queries

SELECT * FROM
aws.ec2.describe_volumes;

Description

Describes the specified EBS volumes or all of your EBS volumes.

If you are describing a long list of volumes, we recommend that you paginate the output to make the list more manageable. For more information, see Pagination.

For more information about EBS volumes, see Amazon EBS volumes in the Amazon EBS User Guide.

We strongly recommend using only paginated requests. Unpaginated requests are susceptible to throttling and timeouts.

The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.

Table Definition

Column NameColumn Data Type
dry_run Input Column

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.

BOOLEAN
filters Input Column

The filters.

  • attachment.attach-time - The time stamp when the attachment initiated.

  • attachment.delete-on-termination - Whether the volume is deleted on instance termination.

  • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1).

  • attachment.instance-id - The ID of the instance the volume is attached to.

  • attachment.status - The attachment state (attaching | attached | detaching).

  • availability-zone - The Availability Zone in which the volume was created.

  • create-time - The time stamp when the volume was created.

  • encrypted - Indicates whether the volume is encrypted (true | false)

  • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false)

  • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false).

  • size - The size of the volume, in GiB.

  • snapshot-id - The snapshot from which the volume was created.

  • status - The state of the volume (creating | available | in-use | deleting | deleted | error).

  • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

  • volume-id - The volume ID.

  • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1| standard)

STRUCT(
"name" VARCHAR,
"values" VARCHAR[]
)[]
Show child fields
filters[]
Show child fields
filters[].name

The name of the filter. Filter names are case-sensitive.

filters[].values[]
volume_ids Input Column

The volume IDs. If not specified, then all volumes are included in the response.

VARCHAR[]
Show child fields
volume_ids[]
_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
attachments

This parameter is not returned by CreateVolume.

Information about the volume attachments.

STRUCT(
"attach_time" TIMESTAMP_S,
"device" VARCHAR,
"instance_id" VARCHAR,
"state" VARCHAR,
"volume_id" VARCHAR,
"delete_on_termination" BOOLEAN,
"associated_resource" VARCHAR,
"instance_owning_service" VARCHAR
)[]
Show child fields
attachments[]
Show child fields
attachments[].associated_resource

The ARN of the Amazon ECS or Fargate task to which the volume is attached.

attachments[].attach_time

The time stamp when the attachment initiated.

attachments[].delete_on_termination

Indicates whether the EBS volume is deleted on instance termination.

attachments[].device

The device name.

If the volume is attached to a Fargate task, this parameter returns null.

attachments[].instance_id

The ID of the instance.

If the volume is attached to a Fargate task, this parameter returns null.

attachments[].instance_owning_service

The service principal of Amazon Web Services service that owns the underlying instance to which the volume is attached.

This parameter is returned only for volumes that are attached to Fargate tasks.

attachments[].state

The attachment state of the volume.

attachments[].volume_id

The ID of the volume.

availability_zone

The Availability Zone for the volume.

VARCHAR
create_time

The time stamp when volume creation was initiated.

TIMESTAMP_S
encrypted

Indicates whether the volume is encrypted.

BOOLEAN
fast_restored

This parameter is not returned by CreateVolume.

Indicates whether the volume was created using fast snapshot restore.

BOOLEAN
iops

The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

BIGINT
kms_key_id

The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the volume.

VARCHAR
multi_attach_enabled

Indicates whether Amazon EBS Multi-Attach is enabled.

BOOLEAN
outpost_arn

The Amazon Resource Name (ARN) of the Outpost.

VARCHAR
size

The size of the volume, in GiBs.

BIGINT
snapshot_id

The snapshot from which the volume was created, if applicable.

VARCHAR
sse_type

This parameter is not returned by CreateVolume.

Reserved for future use.

VARCHAR
state

The volume state.

VARCHAR
tags

Any tags assigned to the volume.

STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
Show child fields
tags[]
Show child fields
tags[].key

The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

tags[].value

The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

throughput

The throughput that the volume supports, in MiB/s.

BIGINT
volume_id

The ID of the volume.

VARCHAR
volume_type

The volume type.

VARCHAR