# Method: projects.locations.deployments.exportLock

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

Exports the lock info on a locked deployment.

### HTTP request

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

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 must be empty.

### Response body

Details about the lock which locked the deployment.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "lockId": string, "operation": string, "info": string, "who": string, "version": string, "createTime": string } ``` |

| Fields ||
|---|---|
| `lockId` | `string (https://developers.google.com/discovery/v1/type-format format)` Unique ID for the lock to be overridden with generation ID in the backend. |
| `operation` | `string` Terraform operation, provided by the caller. |
| `info` | `string` Extra information to store with the lock, provided by the caller. |
| `who` | `string` [user@hostname](mailto:user@hostname) when available |
| `version` | `string` Terraform version |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Time that the lock was taken. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

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

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