updateVolume method

Future<UpdateVolumeResponse> updateVolume({
  1. required String volumeId,
  2. String? clientRequestToken,
  3. String? name,
  4. UpdateOntapVolumeConfiguration? ontapConfiguration,
  5. UpdateOpenZFSVolumeConfiguration? openZFSConfiguration,
})

Updates the configuration of an Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volume.

May throw BadRequest. May throw IncompatibleParameterError. May throw InternalServerError. May throw MissingVolumeConfiguration. May throw VolumeNotFound.

Parameter volumeId : The ID of the volume that you want to update, in the format fsvol-0123456789abcdef0.

Parameter name : The name of the OpenZFS volume. OpenZFS root volumes are automatically named FSX. Child volume names must be unique among their parent volume's children. The name of the volume is part of the mount string for the OpenZFS volume.

Parameter ontapConfiguration : The configuration of the ONTAP volume that you are updating.

Parameter openZFSConfiguration : The configuration of the OpenZFS volume that you are updating.

Implementation

Future<UpdateVolumeResponse> updateVolume({
  required String volumeId,
  String? clientRequestToken,
  String? name,
  UpdateOntapVolumeConfiguration? ontapConfiguration,
  UpdateOpenZFSVolumeConfiguration? openZFSConfiguration,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSSimbaAPIService_v20180301.UpdateVolume'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'VolumeId': volumeId,
      'ClientRequestToken':
          clientRequestToken ?? _s.generateIdempotencyToken(),
      if (name != null) 'Name': name,
      if (ontapConfiguration != null)
        'OntapConfiguration': ontapConfiguration,
      if (openZFSConfiguration != null)
        'OpenZFSConfiguration': openZFSConfiguration,
    },
  );

  return UpdateVolumeResponse.fromJson(jsonResponse.body);
}