updateVolume method
Updates an Amazon EBS volume's name or mount point. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
May throw ValidationException. May throw ResourceNotFoundException.
Parameter volumeId
:
The volume ID.
Parameter mountPoint
:
The new mount point.
Parameter name
:
The new name.
Implementation
Future<void> updateVolume({
required String volumeId,
String? mountPoint,
String? name,
}) async {
ArgumentError.checkNotNull(volumeId, 'volumeId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OpsWorks_20130218.UpdateVolume'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'VolumeId': volumeId,
if (mountPoint != null) 'MountPoint': mountPoint,
if (name != null) 'Name': name,
},
);
}