# Method: projects.locations.deploymentGroups.provision

- [HTTP request](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#body.aspect_1)
- [DeploymentSpec](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#DeploymentSpec)
  - [JSON representation](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#DeploymentSpec.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#try-it)

Provisions a deployment group.

NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the *last successful* `https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups.revisions#DeploymentGroupRevision` but are *no longer* included in the *current* `https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups#DeploymentGroup` definition (e.g., following an `deploymentGroups.patch` call), along with their actuated resources.

### HTTP request

`POST https://config.googleapis.com/v1/{name=projects/*/locations/*/deploymentGroups/*}:provision`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the deployment group to provision. Format: 'projects/{projectId}/locations/{location}/deploymentGroups/{deploymentGroup}'. It takes the form `projects/{project}/locations/{location}/deploymentGroups/{deploymentgroup}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `config.deploymentgroups.provision` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "deploymentSpecs": { string: { object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#DeploymentSpec`) }, ... } } ``` |

| Fields ||
|---|---|
| `deploymentSpecs` | ``map (key: string, value: object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deploymentGroups/provision#DeploymentSpec`))`` Optional. The deployment specs of the deployment units to be created within the same project and location of the deployment group. The key is the unit ID, and the value is the `DeploymentSpec`. Provisioning will fail if a `deployment_spec` has a `deploymentId` that matches an existing deployment in the same project and location. If an existing deployment was part of the last successful revision but is no longer in the current DeploymentGroup's `deploymentUnits`, it will be recreated if included in `deploymentSpecs`. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `config.googleapis.com/config.deploymentgroups.provision`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## DeploymentSpec

Spec for a deployment to be created.

| JSON representation |
|---|
| ``` { "deploymentId": string, "deployment": { object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deployments#Deployment`) } } ``` |

| Fields ||
|---|---|
| `deploymentId` | `string` Required. The id of the deployment to be created which doesn't include the project id and location. |
| `deployment` | ``object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/projects.locations.deployments#Deployment`)`` Required. The deployment to be created. |