updateFlywheel method
Update the configuration information for an existing flywheel.
May throw InternalServerException.
May throw InvalidRequestException.
May throw KmsKeyValidationException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
Parameter flywheelArn :
The Amazon Resource Number (ARN) of the flywheel to update.
Parameter activeModelArn :
The Amazon Resource Number (ARN) of the active model version.
Parameter dataAccessRoleArn :
The Amazon Resource Name (ARN) of the IAM role that grants Amazon
Comprehend permission to access the flywheel data.
Parameter dataSecurityConfig :
Flywheel data security configuration.
Implementation
Future<UpdateFlywheelResponse> updateFlywheel({
required String flywheelArn,
String? activeModelArn,
String? dataAccessRoleArn,
UpdateDataSecurityConfig? dataSecurityConfig,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Comprehend_20171127.UpdateFlywheel'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FlywheelArn': flywheelArn,
if (activeModelArn != null) 'ActiveModelArn': activeModelArn,
if (dataAccessRoleArn != null) 'DataAccessRoleArn': dataAccessRoleArn,
if (dataSecurityConfig != null)
'DataSecurityConfig': dataSecurityConfig,
},
);
return UpdateFlywheelResponse.fromJson(jsonResponse.body);
}