(fleetsV1() )
Operations to manage and view a fleet .
CreateFleetDeprecated
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .CreateFleetDeprecatedResponse ;
import dev .hathora .cloud_sdk .models .shared .*;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.security (Security .builder ()
.hathoraDevToken (System .getenv ().getOrDefault ("HATHORA_DEV_TOKEN" , "" ))
.build ())
.build ();
CreateFleetDeprecatedResponse res = sdk .fleetsV1 ().createFleetDeprecated ()
.createFleet (CreateFleet .builder ()
.autoscalerConfig (AutoscalerConfig .builder ()
.scaleUpThreshold (78718 )
.build ())
.name ("production" )
.nodeShape (NodeShape .GPU_H100252468 )
.build ())
.call ();
if (res .fleet ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
createFleet
CreateFleet
✔️
N/A
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
CreateFleetDeprecatedResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 408, 422, 429
application/json
models/errors/ApiError
500
application/json
models/errors/SDKError
4XX, 5XX
*/*
Returns a fleet .
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetFleetDeprecatedResponse ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.security (Security .builder ()
.hathoraDevToken (System .getenv ().getOrDefault ("HATHORA_DEV_TOKEN" , "" ))
.build ())
.build ();
GetFleetDeprecatedResponse res = sdk .fleetsV1 ().getFleetDeprecated ()
.fleetId ("<id>" )
.call ();
if (res .fleet ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
fleetId
String
✔️
N/A
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
GetFleetDeprecatedResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 408, 422, 429
application/json
models/errors/ApiError
500
application/json
models/errors/SDKError
4XX, 5XX
*/*
getFleetMetricsDeprecated
Gets aggregate metrics for a fleet .
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetFleetMetricsDeprecatedRequest ;
import dev .hathora .cloud_sdk .models .operations .GetFleetMetricsDeprecatedResponse ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.security (Security .builder ()
.hathoraDevToken (System .getenv ().getOrDefault ("HATHORA_DEV_TOKEN" , "" ))
.build ())
.build ();
GetFleetMetricsDeprecatedRequest req = GetFleetMetricsDeprecatedRequest .builder ()
.fleetId ("<id>" )
.build ();
GetFleetMetricsDeprecatedResponse res = sdk .fleetsV1 ().getFleetMetricsDeprecated ()
.request (req )
.call ();
if (res .fleetMetricsData ().isPresent ()) {
// handle response
}
}
}
GetFleetMetricsDeprecatedResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 408, 422, 429
application/json
models/errors/ApiError
500
application/json
models/errors/SDKError
4XX, 5XX
*/*
Gets the configuration for a given fleet in a region.
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetFleetRegionDeprecatedResponse ;
import dev .hathora .cloud_sdk .models .shared .Region ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.security (Security .builder ()
.hathoraDevToken (System .getenv ().getOrDefault ("HATHORA_DEV_TOKEN" , "" ))
.build ())
.build ();
GetFleetRegionDeprecatedResponse res = sdk .fleetsV1 ().getFleetRegionDeprecated ()
.fleetId ("<id>" )
.region (Region .SAO_PAULO )
.call ();
if (res .fleetRegion ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
fleetId
String
✔️
N/A
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
region
Region
✔️
N/A
GetFleetRegionDeprecatedResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 408, 422, 429
application/json
models/errors/SDKError
4XX, 5XX
*/*
getFleetRegionMetricsDeprecated
Gets metrics for a region in a fleet .
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetFleetRegionMetricsDeprecatedRequest ;
import dev .hathora .cloud_sdk .models .operations .GetFleetRegionMetricsDeprecatedResponse ;
import dev .hathora .cloud_sdk .models .shared .Region ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.security (Security .builder ()
.hathoraDevToken (System .getenv ().getOrDefault ("HATHORA_DEV_TOKEN" , "" ))
.build ())
.build ();
GetFleetRegionMetricsDeprecatedRequest req = GetFleetRegionMetricsDeprecatedRequest .builder ()
.fleetId ("<id>" )
.region (Region .DUBAI )
.build ();
GetFleetRegionMetricsDeprecatedResponse res = sdk .fleetsV1 ().getFleetRegionMetricsDeprecated ()
.request (req )
.call ();
if (res .fleetMetricsData ().isPresent ()) {
// handle response
}
}
}
GetFleetRegionMetricsDeprecatedResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 408, 422, 429
application/json
models/errors/ApiError
500
application/json
models/errors/SDKError
4XX, 5XX
*/*
Returns an array of fleets .
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetFleetsDeprecatedResponse ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.security (Security .builder ()
.hathoraDevToken (System .getenv ().getOrDefault ("HATHORA_DEV_TOKEN" , "" ))
.build ())
.build ();
GetFleetsDeprecatedResponse res = sdk .fleetsV1 ().getFleetsDeprecated ()
.call ();
if (res .fleetsPage ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
GetFleetsDeprecatedResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 408, 429
application/json
models/errors/ApiError
500
application/json
models/errors/SDKError
4XX, 5XX
*/*
Updates a fleet 's configuration.
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .UpdateFleetDeprecatedResponse ;
import dev .hathora .cloud_sdk .models .shared .*;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.security (Security .builder ()
.hathoraDevToken (System .getenv ().getOrDefault ("HATHORA_DEV_TOKEN" , "" ))
.build ())
.build ();
UpdateFleetDeprecatedResponse res = sdk .fleetsV1 ().updateFleetDeprecated ()
.updateFleet (UpdateFleet .builder ()
.autoscalerConfig (AutoscalerConfig .builder ()
.scaleUpThreshold (638855 )
.build ())
.name ("production" )
.build ())
.fleetId ("<id>" )
.call ();
// handle response
}
}
Parameter
Type
Required
Description
Example
updateFleet
UpdateFleet
✔️
N/A
fleetId
String
✔️
N/A
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
UpdateFleetDeprecatedResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 408, 422, 429
application/json
models/errors/ApiError
500
application/json
models/errors/SDKError
4XX, 5XX
*/*
updateFleetRegionDeprecated
Updates the configuration for a given fleet in a region.
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .UpdateFleetRegionDeprecatedRequest ;
import dev .hathora .cloud_sdk .models .operations .UpdateFleetRegionDeprecatedResponse ;
import dev .hathora .cloud_sdk .models .shared .*;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.security (Security .builder ()
.hathoraDevToken (System .getenv ().getOrDefault ("HATHORA_DEV_TOKEN" , "" ))
.build ())
.build ();
UpdateFleetRegionDeprecatedRequest req = UpdateFleetRegionDeprecatedRequest .builder ()
.fleetRegionConfig (FleetRegionConfig .builder ()
.cloudMinVcpus (122781 )
.build ())
.fleetId ("<id>" )
.region (Region .JOHANNESBURG )
.build ();
UpdateFleetRegionDeprecatedResponse res = sdk .fleetsV1 ().updateFleetRegionDeprecated ()
.request (req )
.call ();
// handle response
}
}
UpdateFleetRegionDeprecatedResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 408, 422, 429
application/json
models/errors/ApiError
500
application/json
models/errors/SDKError
4XX, 5XX
*/*