Skip to content

Latest commit

 

History

History
262 lines (175 loc) · 12.3 KB

README.md

File metadata and controls

262 lines (175 loc) · 12.3 KB

BuildsV3

(BuildsV3)

Overview

Available Operations

  • CreateBuild - Creates a new build with optional multipartUploadUrls that can be used to upload larger builds in parts before calling runBuild. Responds with a buildId that you must pass to RunBuild() to build the game server artifact. You can optionally pass in a buildTag to associate an external version with a build.
  • DeleteBuild - Delete a build. All associated metadata is deleted. Be careful which builds you delete. This endpoint does not prevent you from deleting actively used builds. Deleting a build that is actively build used by an app's deployment will cause failures when creating rooms.
  • GetBuild - Get details for a build.
  • GetBuilds - Returns an array of builds for an application.
  • RunBuild - Builds a game server artifact from a tarball you provide. Pass in the buildId generated from CreateBuild().

CreateBuild

Creates a new build with optional multipartUploadUrls that can be used to upload larger builds in parts before calling runBuild. Responds with a buildId that you must pass to RunBuild() to build the game server artifact. You can optionally pass in a buildTag to associate an external version with a build.

Example Usage

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");

CreateBuildRequest req = new CreateBuildRequest() {
    CreateMultipartBuildParams = new CreateMultipartBuildParams() {
        BuildSizeInBytes = 5387.85D,
        BuildTag = "0.1.14-14c793",
    },
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.BuildsV3.CreateBuildAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request CreateBuildRequest ✔️ The request object to use for the request.

Response

CreateBuildResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 400,401,404,422,429,500 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

DeleteBuild

Delete a build. All associated metadata is deleted. Be careful which builds you delete. This endpoint does not prevent you from deleting actively used builds. Deleting a build that is actively build used by an app's deployment will cause failures when creating rooms.

Example Usage

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");

DeleteBuildRequest req = new DeleteBuildRequest() {
    BuildId = "<value>",
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.BuildsV3.DeleteBuildAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request DeleteBuildRequest ✔️ The request object to use for the request.

Response

DeleteBuildResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404,422,429,500 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

GetBuild

Get details for a build.

Example Usage

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");

GetBuildRequest req = new GetBuildRequest() {
    BuildId = "<value>",
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.BuildsV3.GetBuildAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request GetBuildRequest ✔️ The request object to use for the request.

Response

GetBuildResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404,429 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

GetBuilds

Returns an array of builds for an application.

Example Usage

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");

GetBuildsRequest req = new GetBuildsRequest() {
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.BuildsV3.GetBuildsAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request GetBuildsRequest ✔️ The request object to use for the request.

Response

GetBuildsResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404,429 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

RunBuild

Builds a game server artifact from a tarball you provide. Pass in the buildId generated from CreateBuild().

Example Usage

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");

RunBuildRequest req = new RunBuildRequest() {
    BuildId = "<value>",
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.BuildsV3.RunBuildAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request RunBuildRequest ✔️ The request object to use for the request.

Response

RunBuildResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 400,401,404,429,500 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /