modify_volume
¶
modify_volume(
volume_id: VolumeId,
*,
config_overrides: Optional[WorkspacesInstancesClientConfig] = None,
size_in_gb: Optional[VolumeSizeInGB] = None,
volume_type: Optional[VolumeTypeEnum] = None,
iops: Optional[NonNegativeInteger] = None,
throughput: Optional[NonNegativeInteger] = None,
client_token: Optional[ClientToken] = None,
) -> ModifyVolumeResponse
Modifies the size, volume type, IOPS (input/output operations per second), or throughput of a volume. When you modify a volume, you must specify at least one of these parameters. You can modify a volume only after any previous modification for that volume has finished.
To track the progress of a modification, use the Amazon EC2 DescribeVolumesModifications operation. For more information, see Monitor the progress of Amazon EBS volume modifications in the Amazon EBS User Guide.
After you increase the size of a volume, you must extend the partition and file system to use the new storage capacity. For more information, see Extend the file system after resizing an Amazon EBS volume in the Amazon EBS User Guide, which covers both Linux and Windows instances.
Parameters:
-
volume_id(VolumeId) –Specifies the identifier of the volume to modify.
-
size_in_gb(Optional[VolumeSizeInGB], default:None) –Specifies the target size of the volume, in GiB. The target size must be greater than or equal to the current size of the volume. If you don't specify a size, the current size is retained.
-
volume_type(Optional[VolumeTypeEnum], default:None) –Specifies the target Amazon Elastic Block Store (Amazon EBS) volume type. If you don't specify a volume type, the current volume type is retained.
-
iops(Optional[NonNegativeInteger], default:None) –Specifies the target IOPS rate of the volume. This parameter is valid only for
gp3,io1, andio2volumes. If you don't specify IOPS and keep the same volume type, the current IOPS rate is retained. -
throughput(Optional[NonNegativeInteger], default:None) –Specifies the target throughput of the volume, in MiB/s. This parameter is valid only for
gp3volumes. If you don't specify throughput and the volume remainsgp3, the current throughput is retained. -
client_token(Optional[ClientToken], default:None) –Unique token to ensure idempotent volume modification, preventing duplicate volume modifications.
Raises:
-
AccessDeniedException–Indicates insufficient permissions to perform the requested action.
-
ConflictException–Signals a conflict with the current state of the resource.
-
InternalServerException–Indicates an unexpected server-side error occurred.
-
ResourceNotFoundException–Indicates the requested resource could not be found.
-
ServiceQuotaExceededException–Indicates that a service quota has been exceeded.
-
ThrottlingException–Indicates the request rate has exceeded limits.
-
ValidationException–Indicates invalid input parameters in the request.
-
VolumeModificationRateExceededException–The volume has a previous modification that is still in progress, or has reached the limit of four modifications in a rolling 24-hour period. Wait for the current modification to finish, or wait until the time indicated in the error message, and then retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_workspaces_instances/_services/workspaces_instances.py
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 | |