# Method: projects.locations.workerPools.create

- [HTTP request](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.workerPools/create#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.workerPools/create#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.workerPools/create#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.workerPools/create#body.request_body)
- [Response body](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.workerPools/create#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.workerPools/create#body.aspect)

Creates a new WorkerPool in a given project and location.

### HTTP request

`POST https://run.googleapis.com/v2/{parent}/workerPools`

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The location and project in which this worker pool should be created. Format: `projects/{project}/locations/{location}`, where `{project}` can be project id or number. Only lowercase characters, digits, and hyphens. It takes the form `projects/{project}/locations/{location}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `run.workerpools.create` |

### Query parameters

| Parameters ||
|---|---|
| `workerPoolId` | `string` Optional. The unique identifier for the WorkerPool. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the worker pool becomes `{parent}/workerPools/{workerPoolId}`. If not provided, the server will generate a unique `workerPoolId`. |
| `validateOnly` | `boolean` Optional. Indicates that the request should be validated and default values populated, without persisting the request or creating any resources. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.workerPools#WorkerPool`.

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/run/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://docs.cloud.google.com/docs/authentication#authorization-gcp).