(DeploymentsV3)
Operations that allow you configure and manage an application's build at runtime.
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.
using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
using System.Collections.Generic;
var sdk = new HathoraCloudSDK(
security: new Security() {
HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
},
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
orgId: "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39");
CreateDeploymentRequest req = new CreateDeploymentRequest() {
DeploymentConfigV3 = new DeploymentConfigV3() {
AdditionalContainerPorts = new List<ContainerPort>() {
new ContainerPort() {
Name = "default",
Port = 8000,
TransportType = TransportType.Udp,
},
},
BuildId = "bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5",
ContainerPort = 4000,
DeploymentTag = "alpha",
Env = new List<DeploymentConfigV3Env>() {
new DeploymentConfigV3Env() {
Name = "EULA",
Value = "TRUE",
},
},
ExperimentalRequestedGPU = 1D,
IdleTimeoutEnabled = false,
RequestedCPU = 0.5D,
RequestedMemoryMB = 1024D,
RoomsPerProcess = 3,
TransportType = TransportType.Tcp,
},
AppId = "app-af469a92-5b45-4565-b3c4-b79878de67d2",
};
using(var res = await sdk.DeploymentsV3.CreateDeploymentAsync(req))
{
// handle response
}
CreateDeploymentResponse
Error Type |
Status Code |
Content Type |
HathoraCloud.Models.Errors.ApiError |
400, 401, 404, 422, 429 |
application/json |
HathoraCloud.Models.Errors.ApiError |
500 |
application/json |
HathoraCloud.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Get details for a deployment.
using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
var sdk = new HathoraCloudSDK(
security: new Security() {
HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
},
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
orgId: "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39");
GetDeploymentRequest req = new GetDeploymentRequest() {
DeploymentId = "dep-6d4c6a71-2d75-4b42-94e1-f312f57f33c5",
AppId = "app-af469a92-5b45-4565-b3c4-b79878de67d2",
};
using(var res = await sdk.DeploymentsV3.GetDeploymentAsync(req))
{
// handle response
}
Parameter |
Type |
Required |
Description |
request |
GetDeploymentRequest |
✔️ |
The request object to use for the request. |
GetDeploymentResponse
Error Type |
Status Code |
Content Type |
HathoraCloud.Models.Errors.ApiError |
401, 404, 429 |
application/json |
HathoraCloud.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Returns an array of deployments for an application, optionally filtered by deploymentTag.
using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
var sdk = new HathoraCloudSDK(
security: new Security() {
HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
},
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
orgId: "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39");
GetDeploymentsRequest req = new GetDeploymentsRequest() {
AppId = "app-af469a92-5b45-4565-b3c4-b79878de67d2",
DeploymentTag = "alpha",
};
using(var res = await sdk.DeploymentsV3.GetDeploymentsAsync(req))
{
// handle response
}
Parameter |
Type |
Required |
Description |
request |
GetDeploymentsRequest |
✔️ |
The request object to use for the request. |
GetDeploymentsResponse
Error Type |
Status Code |
Content Type |
HathoraCloud.Models.Errors.ApiError |
401, 404, 429 |
application/json |
HathoraCloud.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Get the latest deployment for an application.
using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
var sdk = new HathoraCloudSDK(
security: new Security() {
HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
},
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
orgId: "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39");
GetLatestDeploymentRequest req = new GetLatestDeploymentRequest() {
AppId = "app-af469a92-5b45-4565-b3c4-b79878de67d2",
};
using(var res = await sdk.DeploymentsV3.GetLatestDeploymentAsync(req))
{
// handle response
}
GetLatestDeploymentResponse
Error Type |
Status Code |
Content Type |
HathoraCloud.Models.Errors.ApiError |
401, 404, 422, 429 |
application/json |
HathoraCloud.Models.Errors.SDKException |
4XX, 5XX |
*/* |