# Method: projects.locations.instances.detachLun

- [HTTP request](https://docs.cloud.google.com/bare-metal/docs/reference/rest/v2/projects.locations.instances/detachLun#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/bare-metal/docs/reference/rest/v2/projects.locations.instances/detachLun#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/bare-metal/docs/reference/rest/v2/projects.locations.instances/detachLun#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/bare-metal/docs/reference/rest/v2/projects.locations.instances/detachLun#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/bare-metal/docs/reference/rest/v2/projects.locations.instances/detachLun#body.response_body)
- [Authorization Scopes](https://docs.cloud.google.com/bare-metal/docs/reference/rest/v2/projects.locations.instances/detachLun#body.aspect)
- [Try it!](https://docs.cloud.google.com/bare-metal/docs/reference/rest/v2/projects.locations.instances/detachLun#try-it)

Detach LUN from Instance.

### HTTP request

`POST https://baremetalsolution.googleapis.com/v2/{instance=projects/*/locations/*/instances/*}:detachLun`

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

### Path parameters

| Parameters ||
|---|---|
| `instance` | `string` Required. Name of the instance. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "lun": string, "skipReboot": boolean } ``` |

| Fields ||
|---|---|
| `lun` | `string` Required. Name of the Lun to detach. |
| `skipReboot` | `boolean` If true, performs lun unmapping without instance reboot. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/bare-metal/docs/reference/rest/v2/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://cloud.google.com/docs/authentication/).