# Gamedeploymenttemplate

The GameDeploymentTemplate indicates which \[game server] [ApplicationBuilds](/game-hosting/elements/application/applicationbuild.md) you want to have deployed within a [Fleet](/game-hosting/elements/deploymentenvironment/fleet.md).

<figure><img src="/files/RcQ2Yx8s61nmHGQlYrGT" alt=""><figcaption></figcaption></figure>

Figure 1: Highlighting where the GameDeploymentTemplate elements belong in the overview

## Usage

A GameDeploymentTemplate is used by a [Fleet](/game-hosting/elements/deploymentenvironment/fleet.md) and defines which ApplicationBuilds (of type Game) will be deployed for that Fleet. A single GameDeploymentTemplate can define more than one ApplicationBuild by adding multiple [GameDeploymentTemplateBuild](#gamedeploymenttemplatebuild-element-structure) elements. Each of these defines a single (ApplicationBuild (of type Game).

Each ApplicationBuild defined in a template will be treated like individually scalable builds. If you set a Fleet's operational status to ["Automatic Deployment"](/game-hosting/processes/automatic-deployment.md#automatic-deployment_1), each build will be deployed individually according to the [DeploymentProfile.minimumCapacity](/game-hosting/processes/automatic-deployment.md#minimum-capacity-deployments) value. Similarly, when you set the Fleet's operational status to ["Automatic Scaling"](/game-hosting/processes/automatic-deployment.md#automatic-scaling), each build will be automatically scaled individually. In short, each ApplicationBuild in the GameDeploymentTemplate is treated individually. No relationship between the defined ApplicationBuilds exists.

You can create as many GameDeploymentTemplates as you like within the platform. However, a Fleet can only point to one GameDeploymentTemplate at a time. A GameDeploymentTemplate can be shared (re-used) across multiple fleets though.

## Element structure

| Property                    | Value type                                                                       | Required  | Description                                                                                         |
| --------------------------- | -------------------------------------------------------------------------------- | --------- | --------------------------------------------------------------------------------------------------- |
| id                          | string                                                                           | Read-only | Unique identifier of this element                                                                   |
| fleetIds                    | \[int]                                                                           | Read-only | List of [Fleet](/game-hosting/elements/deploymentenvironment/fleet.md) IDs this template is used in |
| name                        | string                                                                           | Yes       | Name of the template                                                                                |
| inUse                       | boolean                                                                          | Read-only | Indicates whether this template is actively being used in a Fleet                                   |
| createdAt                   | int                                                                              | Read-only | A unix timestamp of when this element was created                                                   |
| gameDeploymentTemplateBuild | \[[GameDeploymentTemplateBuild](#gamedeploymenttemplatebuild-element-structure)] | Yes       | List of GameDeploymentTemplateBuild elements, pointing to ApplicationBuilds                         |

Table 1: GameDeploymentTemplate element structure

## GameDeploymentTemplateBuild element structure

| Property           | Value type | Required | Description                                                                                                     |
| ------------------ | ---------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| applicationBuildId | string     | Yes      | Identifier of the [ApplicationBuild](/game-hosting/elements/application/applicationbuild.md) you want to deploy |

Table 2: GameDeploymentTemplateBuild element structure

## API example

Create a new GameDeploymentTemplate within your i3D.net account.

[Full API reference](/api/api_one.md#v3-deploymenttemplate-game)

#### HTTP request

[`POST /v3/deploymentTemplate/game`](/api/api_one.md#v3-deploymenttemplate-game)

#### Request body

```
{
  "name": "MyGameDeploymentTemplate",
  "gameDeploymentTemplateBuild": [
    {
      "applicationBuildId": "3776948653267321543"
    }
  ]
}
```

#### Response body

```
[
  {
    "id": "6537333393893172977",
    "fleetIds": [
      0
    ],
    "name": "MyGameDeploymentTemplate",
    "inUse": 0,
    "createdAt": 1573060361,
    "gameDeploymentTemplateBuild": [
      {
        "applicationBuildId": "3776948653267321543"
      }
    ]
  }
]
```

## Attach GameDeploymentTemplate to a Fleet:

[Full API reference](/api/api_one.md#v3-fleet)

#### HTTP request

[`PUT /v3/fleet/{fleetId}`](/api/api_one.md#v3-fleet-fleetid)

#### Request body

```
{
  "gameDeploymentTemplateId": "6537333393893172977",
}
```

#### Response body

```
[
  {
    "id": "string",
    "name": "string",
    "deploymentEnvironmentId": "string",
    "deploymentProfileId": "string",
    "gameDeploymentTemplateId": "6537333393893172977",
    "utilityDeploymentTemplateId": "string",
    "operationalStatus": 0
  }
]
```

## Related topics

* [Orchestrator Overview](/game-hosting/game-integration/orchestratoroverview.md)
* [Game Deployment Quick Start Guide](/game-hosting/overview/quick-start.md)
* [i3d.net API documentation](https://www.i3d.net/docs/api/v3/all/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.i3d.net/game-hosting/elements/deploymentenvironment/index/gamedeploymenttemplate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
