> For the complete documentation index, see [llms.txt](https://docs.i3d.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.i3d.net/game-hosting/elements/deploymentenvironment/index/gamedeploymenttemplate.md).

# Gamedeploymenttemplate

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

<figure><img src="https://3255620342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTxqXHcEUC6lhXmjD6wE0%2Fuploads%2Fgit-blob-f9764d07991cfe47dfe5cad61257f8e75d7e015c%2FDeploymentConfigurationOverviewGameDepTempl.png?alt=media" alt=""><figcaption></figcaption></figure>

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

## Usage

A GameDeploymentTemplate is used by a [Fleet](https://docs.i3d.net/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"](https://docs.i3d.net/game-hosting/processes/automatic-deployment.md#automatic-deployment_1), each build will be deployed individually according to the [DeploymentProfile.minimumCapacity](https://docs.i3d.net/game-hosting/processes/automatic-deployment.md#minimum-capacity-deployments) value. Similarly, when you set the Fleet's operational status to ["Automatic Scaling"](https://docs.i3d.net/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](https://docs.i3d.net/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](https://docs.i3d.net/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](https://docs.i3d.net/api/api_one.md#v3-deploymenttemplate-game)

#### HTTP request

[`POST /v3/deploymentTemplate/game`](https://docs.i3d.net/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](https://docs.i3d.net/api/api_one.md#v3-fleet)

#### HTTP request

[`PUT /v3/fleet/{fleetId}`](https://docs.i3d.net/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](https://docs.i3d.net/game-hosting/game-integration/orchestratoroverview.md)
* [Game Deployment Quick Start Guide](https://docs.i3d.net/game-hosting/overview/quick-start.md)
* [i3d.net API documentation](https://www.i3d.net/docs/api/v3/all/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
