Hi
Im trying to use the java API in a kotlin command line based application though get a 400 request. Any help figuring out what Im doing wrong would be appreciated
Here is the code I am using
try {
log.d("Creating new exoscale instance")
val response = exoscaleApi.listInstanceTypes()
val tinyInstance =
response.instanceTypes?.find { it.size == InstanceType.SizeEnum.TINY && it.family == InstanceType.FamilyEnum.STANDARD }
if (tinyInstance == null) {
log.e("Couldn't find tiny instance type")
return false
}
val createInstanceRequest = CreateInstanceRequest().also {
it.name = "WurstV2"
it.template = exoscaleApi.getTemplate(UUID.fromString(exoscaleConfig().templateId))
it.instanceType = tinyInstance
it.sshKey = SshKey(exoscaleConfig().sshKey)
it.publicIpAssignment = PublicIpAssignment.INET4
it.diskSize = 10L
}
val operation: Operation = exoscaleApi.createInstance(createInstanceRequest)
} catch (e: Throwable) {
log.d("Problem when creating new instance : ${e.message}")
return false
}
Here is a sample request below.

Hi
Im trying to use the java API in a kotlin command line based application though get a 400 request. Any help figuring out what Im doing wrong would be appreciated
Here is the code I am using
Here is a sample request below.