class Multiwoven::Integrations::Source::AwsSagemakerModel::Client

def check_connection(connection_config)

def check_connection(connection_config)
  connection_config = connection_config.with_indifferent_access
  create_connection(connection_config)
  response = @client.describe_endpoint(endpoint_name: connection_config[:endpoint_name])
  if response.endpoint_status == "InService"
    success_status
  else
    failure_status
  end
rescue StandardError => e
  ConnectionStatus.new(status: ConnectionStatusType["failed"], message: e.message).to_multiwoven_message
end