Skip to content

EC2  >  Operations  >  modify_volume_attribute

modify_volume_attribute

Operation

modify_volume_attribute async

modify_volume_attribute(input: ModifyVolumeAttributeInput, plugins: list[Plugin] | None = None) -> ModifyVolumeAttributeOutput

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:

Name Type Description Default
input ModifyVolumeAttributeInput

An instance of ModifyVolumeAttributeInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ModifyVolumeAttributeOutput

An instance of ModifyVolumeAttributeOutput.

Input

ModifyVolumeAttributeInput dataclass

Bases: _SerdeShape

Dataclass for ModifyVolumeAttributeInput structure.

Attributes

auto_enable_io class-attribute instance-attribute
auto_enable_io: AttributeBooleanValue | None = ...

Indicates whether the volume should be auto-enabled for I/O operations.

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

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.

volume_id class-attribute instance-attribute
volume_id: str | None = ...

The ID of the volume.

Output

ModifyVolumeAttributeOutput dataclass

Bases: _SerdeShape

Dataclass for ModifyVolumeAttributeOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.