# Method: projects.locations.bareMetalClusters.bareMetalNodePools.enroll

- [HTTP request](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters.bareMetalNodePools/enroll#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters.bareMetalNodePools/enroll#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters.bareMetalNodePools/enroll#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters.bareMetalNodePools/enroll#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters.bareMetalNodePools/enroll#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters.bareMetalNodePools/enroll#body.aspect)

Enrolls an existing bare metal node pool to the Anthos On-Prem API within a given project and location. Through enrollment, an existing node pool will become Anthos On-Prem API managed. The corresponding GCP resources will be created.

### HTTP request

`POST https://gkeonprem.googleapis.com/v1/{parent=projects/*/locations/*/bareMetalClusters/*}/bareMetalNodePools:enroll`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent resource where this node pool will be created. projects/{project}/locations/{location}/bareMetalClusters/{cluster} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "bareMetalNodePoolId": string, "validateOnly": boolean } ``` |

| Fields ||
|---|---|
| `bareMetalNodePoolId` | `string` User provided OnePlatform identifier that is used as part of the resource name. (<https://tools.ietf.org/html/rfc1123>) format. |
| `validateOnly` | `boolean` If set, only validate the request, but do not actually enroll the node pool. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/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).