(deploymentsV1())
createDeploymentV1Deprecated- CreateDeploymentV1Deprecated⚠️ DeprecatedgetDeploymentInfoV1Deprecated- GetDeploymentInfoV1Deprecated⚠️ DeprecatedgetDeploymentsV1Deprecated- GetDeploymentsV1Deprecated⚠️ DeprecatedgetLatestDeploymentV1Deprecated- GetLatestDeploymentV1Deprecated⚠️ Deprecated
Create a new deployment. Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.CreateDeploymentV1DeprecatedResponse;
import dev.hathora.cloud_sdk.models.shared.DeploymentConfig;
import dev.hathora.cloud_sdk.models.shared.PlanName;
import dev.hathora.cloud_sdk.models.shared.Security;
import dev.hathora.cloud_sdk.models.shared.TransportType;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ApiError, Exception {
HathoraCloud sdk = HathoraCloud.builder()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
CreateDeploymentV1DeprecatedResponse res = sdk.deploymentsV1().createDeploymentV1Deprecated()
.deploymentConfig(DeploymentConfig.builder()
.containerPort(4000)
.env(List.of(
))
.planName(PlanName.TINY)
.roomsPerProcess(3)
.transportType(TransportType.TCP)
.additionalContainerPorts(List.of(
))
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.buildId(1)
.call();
if (res.deploymentV1().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
deploymentConfig |
DeploymentConfig | ✔️ | N/A | |
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
buildId |
int | ✔️ | N/A | 1 |
CreateDeploymentV1DeprecatedResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 400, 401, 404, 422, 429, 500 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
Get details for a deployment.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.GetDeploymentInfoV1DeprecatedResponse;
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()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
GetDeploymentInfoV1DeprecatedResponse res = sdk.deploymentsV1().getDeploymentInfoV1Deprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.deploymentId(1)
.call();
if (res.deploymentV1().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
deploymentId |
int | ✔️ | N/A | 1 |
GetDeploymentInfoV1DeprecatedResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 401, 404, 429 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
Returns an array of deployments for an application.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.GetDeploymentsV1DeprecatedResponse;
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()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
GetDeploymentsV1DeprecatedResponse res = sdk.deploymentsV1().getDeploymentsV1Deprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.call();
if (res.classes().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
GetDeploymentsV1DeprecatedResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 401, 404, 429 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
Get the latest deployment for an application.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.GetLatestDeploymentV1DeprecatedResponse;
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()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
GetLatestDeploymentV1DeprecatedResponse res = sdk.deploymentsV1().getLatestDeploymentV1Deprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.call();
if (res.deploymentV1().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
GetLatestDeploymentV1DeprecatedResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 401, 404, 422, 429 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |