Skip to main content
Version: Latest-3.3

ALTER STORAGE VOLUME

Description

Alters the credential properties, comment, or status (enabled) of a storage volume. For more about the properties of a storage volume, see CREATE STORAGE VOLUME. This feature is supported from v3.1.

CAUTION

  • Only users with the ALTER privilege on a specific storage volume can perform this operation.
  • The TYPE, LOCATIONS, and other path-related properties of an existing storage volume cannot be altered. You can only alter its credential-related properties. If you changed the path-related configuration items, the databases and tables you created before the change become read-only, and you cannot load data into them.
  • When enabled is false, the corresponding storage volume cannot be referenced.

Syntax

ALTER STORAGE VOLUME [ IF EXISTS ] <storage_volume_name>
{ COMMENT = '<comment_string>'
| SET ("key" = "value"[,...]) }

Parameters

ParameterDescription
storage_volume_nameThe name of the storage volume to alter.
COMMENTThe comment on the storage volume.

For detailed information on the properties that can be altered or added, see CREATE STORAGE VOLUME - PROPERTIES.

Examples

Example 1: Disable the storage volume my_s3_volume.

MySQL > ALTER STORAGE VOLUME my_s3_volume
-> SET ("enabled" = "false");
Query OK, 0 rows affected (0.01 sec)

Example 2: Alter the credential information of the storage volume my_s3_volume.

MySQL > ALTER STORAGE VOLUME my_s3_volume
-> SET (
-> "aws.s3.use_instance_profile" = "true"
-> );
Query OK, 0 rows affected (0.00 sec)

Relevant SQL statements