Skip to main content

volume_attributes

Creates, updates, deletes, gets or lists a volume_attributes resource.

Overview

Namevolume_attributes
TypeResource
Idaws.ec2.volume_attributes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
product_code_idstringThe product code.
product_code_typestringThe type of product code.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_volume_attributeselectAttribute, VolumeId, regionDryRunDescribes the specified attribute of the specified volume. You can specify only one attribute at a time. For more information about EBS volumes, see Amazon EBS volumes in the Amazon EBS User Guide.
modify_volume_attributeupdateVolumeId, regionAutoEnableIO, DryRunModifies a volume attribute. By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume. You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
AttributestringThe attribute of the volume. This parameter is required.
VolumeIdstringThe ID of the volume.
regionstringAWS region (default: us-east-1)
AutoEnableIOobjectIndicates whether the volume should be auto-enabled for I/O operations.
DryRunbooleanChecks 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.

SELECT examples

Describes the specified attribute of the specified volume. You can specify only one attribute at a time. For more information about EBS volumes, see Amazon EBS volumes in the Amazon EBS User Guide.

SELECT
product_code_id,
product_code_type
FROM aws.ec2.volume_attributes
WHERE Attribute = '{{ Attribute }}' -- required
AND VolumeId = '{{ VolumeId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
;

UPDATE examples

Modifies a volume attribute. By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume. You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.

UPDATE aws.ec2.volume_attributes
SET
-- No updatable properties
WHERE
VolumeId = '{{ VolumeId }}' --required
AND region = '{{ region }}' --required
AND AutoEnableIO = '{{ AutoEnableIO}}'
AND DryRun = {{ DryRun}};