**Full name**: projects.locations.notebookRuntimes.assign

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

### Endpoint

post `https://{service-endpoint}/v1beta1/{parent}/notebookRuntimes:assign`   
Where `{service-endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest#rest_endpoints).

### Path parameters

`parent` `string` Required. The resource name of the Location to get the NotebookRuntime assignment. Format: `projects/{project}/locations/{location}`

### Request body

The request body contains data with the following structure:
Fields `notebookRuntimeTemplate` `string` Required. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one).
`notebookRuntime` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.notebookRuntimes#NotebookRuntime`)`` Required. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment.
`notebookRuntimeId` `string` Optional. user specified id for the notebook runtime.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `aiplatform.notebookRuntimes.assign`

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