updateStorageProfile method
Updates a storage profile.
May throw AccessDeniedException.
May throw InternalServerErrorException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter farmId :
The farm ID to update.
Parameter storageProfileId :
The storage profile ID to update.
Parameter clientToken :
The unique token which the server uses to recognize retries of the same
request.
Parameter displayName :
The display name of the storage profile to update.
Parameter fileSystemLocationsToAdd :
The file system location names to add.
Parameter fileSystemLocationsToRemove :
The file system location names to remove.
Parameter osFamily :
The OS system to update.
Implementation
Future<void> updateStorageProfile({
required String farmId,
required String storageProfileId,
String? clientToken,
String? displayName,
List<FileSystemLocation>? fileSystemLocationsToAdd,
List<FileSystemLocation>? fileSystemLocationsToRemove,
StorageProfileOperatingSystemFamily? osFamily,
}) async {
final headers = <String, String>{
if (clientToken != null) 'X-Amz-Client-Token': clientToken.toString(),
};
final $payload = <String, dynamic>{
if (displayName != null) 'displayName': displayName,
if (fileSystemLocationsToAdd != null)
'fileSystemLocationsToAdd': fileSystemLocationsToAdd,
if (fileSystemLocationsToRemove != null)
'fileSystemLocationsToRemove': fileSystemLocationsToRemove,
if (osFamily != null) 'osFamily': osFamily.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/2023-10-12/farms/${Uri.encodeComponent(farmId)}/storage-profiles/${Uri.encodeComponent(storageProfileId)}',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}