# Method: projects.locations.deploymentGroups.deprovision

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

Deprovisions 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/*}:deprovision`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the deployment group to deprovision. 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.deprovision` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "force": boolean, "deletePolicy": enum (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/DeletePolicy`) } ``` |

| Fields ||
|---|---|
| `force` | `boolean` Optional. If set to true, this option is propagated to the deletion of each deployment in the group. This corresponds to the 'force' field in DeleteDeploymentRequest. |
| `deletePolicy` | ``enum (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/DeletePolicy`)`` Optional. Policy on how resources within each deployment should be handled during deletion. This policy is applied globally to the deletion of all deployments in this group. This corresponds to the 'deletePolicy' field in DeleteDeploymentRequest. |

### 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.deprovision`

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