volume_attributes
Creates, updates, deletes, gets or lists a volume_attributes resource.
Overview
| Name | volume_attributes |
| Type | Resource |
| Id | aws.ec2.volume_attributes |
Fields
The following fields are returned by SELECT queries:
- describe_volume_attribute
| Name | Datatype | Description |
|---|---|---|
product_code_id | string | The product code. |
product_code_type | string | The type of product code. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_volume_attribute | select | Attribute, VolumeId, region | DryRun | 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. |
modify_volume_attribute | update | VolumeId, region | AutoEnableIO, DryRun | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
Attribute | string | The attribute of the volume. This parameter is required. |
VolumeId | string | The ID of the volume. |
region | string | AWS region (default: us-east-1) |
AutoEnableIO | object | Indicates whether the volume should be auto-enabled for I/O operations. |
DryRun | boolean | 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. |
SELECT examples
- describe_volume_attribute
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
- modify_volume_attribute
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}};