# Method: projects.agentPools.create

Creates an agent pool resource.

### HTTP request

`POST https://storagetransfer.googleapis.com/v1/projects/{projectId}/agentPools`

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

### Path parameters

| Parameters ||
|---|---|
| `projectId` | `string` Required. The ID of the Google Cloud project that owns the agent pool. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `projectId`: - `storagetransfer.agentpools.create` |

### Query parameters

| Parameters ||
|---|---|
| `agentPoolId` | `string` Required. The ID of the agent pool to create. The `agentPoolId` must meet the following requirements: - Length of 128 characters or less. - Not start with the string `goog`. - Start with a lowercase ASCII character, followed by: - Zero or more: lowercase Latin alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). - One or more numerals or lowercase ASCII characters. As expressed by the regular expression: `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/projects.agentPools#AgentPool`.

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/projects.agentPools#AgentPool`.

### 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).