Skip to content

HostCapacityTemplate

With the HostCapacityTemplate element you can define how many game instances you want deployed on any specified BM instance types and / or VM instance types. The actual definitions of the instance types and capacities themselves are defined in the InstanceTypeCapacity elements, which are assigned to this HostCapacityTemplate upon creation.

Element Structure

Property Value type Required Description
id string Read-only Unique identifier of this element
name string Yes The name of the HostCapacityTemplate
createdAt int Read-only A unix timestamp of when this element was created
Table 1: HostCapacityTemplate element structure

API example

Create a new HostCapacityTemplate within your i3D.net account.

Full API reference

HTTP request

POST /v3/hostCapacityTemplate

Request body

{
  "name": "MyHostCapacityTemplate"
}

Response body

[
  {
    "id": "4943474277300823573",
    "name": "MyHostCapacityTemplate",
    "createdAt": 1579007256
  }
]

Assignment to a Fleet

A HostCapacityTemplate can be assigned to a Fleet. Here is a simple example to show you how:

Full API reference

HTTP request

PUT /v3/fleet/{fleetId}

Request body

{
  "hostCapacityTemplateId": "4943474277300823573"
}

Response body

[
  {
    "id": "7420099900751948711",
    "name": "Bluewolf PC",
    "deploymentEnvironmentId": "173892217340309897",
    "deploymentProfileId": "8068976724396537810",
    "gameDeploymentTemplateId": "2190484266497878757",
    "utilityDeploymentTemplateId": "1316371245160957961",
    "dependencyDeploymentTemplateId": "6537333393893172977",
    "hostCapacityTemplateId": "4943474277300823573",
    "operationalStatus": 0
  }
]

Assignment to an ApplicationBuild

A HostCapacityTemplate can also be assigned to an ApplicationBuild. This will override a HostCapacityTemplate set in the Fleet. This is useful if you want to test optimizations of a new build, to see if you can deploy more game instances than before.

Full API reference

HTTP request

PUT /v3/applicationBuild/{applicationBuildId}

Request body

{
  "hostCapacityTemplateId": "4943474277300823573"
}

Response body

[
  {
    "id": "794401102378076360",
    "name": "Bluewolf PC build",
    "applicationId": "7983757100270474749",
    "type": 1,
    "executable": "GameServer",
    "startupParameters": "-applicationInstanceId VARAPPLICATIONINSTANCEID -maxplayers 8",
    "instanceDoesReadyCallback": 0,
    "installId": 8675,
    "osId": 151,
    "hostCapacityTemplateId": "4943474277300823573",
    "createdAt": 1568899371,
    "label": []
  }
]

This element contains a list of InstanceTypeCapacity elements.