# Method: projects.locations.deployments.deleteState

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

Deletes Terraform state file in a given deployment.

### HTTP request

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

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the deployment in the format: 'projects/{projectId}/locations/{location}/deployments/{deployment}'. It takes the form `projects/{project}/locations/{location}/deployments/{deployment}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "lockId": string } ``` |

| Fields ||
|---|---|
| `lockId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Lock ID of the lock file to verify that the user who is deleting the state file previously locked the Deployment. |

### Response body

If successful, the response body is an empty JSON object.

### 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.deployments.deleteState`

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