---
title: "POST /v2/projects/{projectsId}/locations/{locationsId}/instances"
method: POST
path: "/v2/projects/{projectsId}/locations/{locationsId}/instances"
tags: ["projects"]
---

# POST /v2/projects/{projectsId}/locations/{locationsId}/instances

`POST /v2/projects/{projectsId}/locations/{locationsId}/instances`

## Request

- Base URL: `https://notebooks.googleapis.com`
- URL: `https://notebooks.googleapis.com/v2/projects/{projectsId}/locations/{locationsId}/instances`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/notebooks`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/notebooks`

Creates a new Instance in a given project and location.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `instanceId` string
- `requestId` string

## Request body

- Instance: The definition of a notebook instance.
  - `createTime` string, google-datetime: Output only. Instance creation time.
  - `creator` string: Output only. Email address of entity that sent original CreateInstance request.
  - `disableProxyAccess` boolean: Optional. If true, the notebook instance will not register with the proxy.
  - `enableDeletionProtection` boolean: Optional. If true, deletion protection will be enabled for this Workbench Instance. If false, deletion protection will be disabled for this Workbench Instance.
  - `enableManagedEuc` boolean: Optional. Flag to enable managed end user credentials for the instance.
  - `enableThirdPartyIdentity` boolean: Optional. Flag that specifies that a notebook can be accessed with third party identity provider.
  - `gceSetup` GceSetup: The definition of how to configure a VM instance outside of Resources and Identity.
    - `acceleratorConfigs` AcceleratorConfig[]: Optional. The hardware accelerators used on this instance. If you use accelerators, make sure that your configuration has [enough vCPUs and memory to support the `machine_type` you have selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). Currently supports only one accelerator configuration.
      - `coreCount` string, int64: Optional. Count of cores of this accelerator.
      - `type` 'ACCELERATOR_TYPE_UNSPECIFIED' | 'NVIDIA_TESLA_P100' | 'NVIDIA_TESLA_V100' | 'NVIDIA_TESLA_P4' | 'NVIDIA_TESLA_T4' | 'NVIDIA_TESLA_A100' | 'NVIDIA_A100_80GB' | 'NVIDIA_L4' | 'NVIDIA_H100_80GB' | 'NVIDIA_H100_MEGA_80GB' | 'NVIDIA_H200_141GB' | 'NVIDIA_TESLA_T4_VWS' | 'NVIDIA_TESLA_P100_VWS' | 'NVIDIA_TESLA_P4_VWS' | 'NVIDIA_B200' | 'NVIDIA_RTX6000': Optional. Type of this accelerator.
    - `bootDisk` BootDisk: The definition of a boot disk.
      - `diskEncryption` 'DISK_ENCRYPTION_UNSPECIFIED' | 'GMEK' | 'CMEK': Optional. Disk encryption method used on the boot and data disks, defaults to GMEK.
      - `diskSizeGb` string, int64: Optional. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). If not specified, this defaults to the recommended value of 150GB.
      - `diskType` 'DISK_TYPE_UNSPECIFIED' | 'PD_STANDARD' | 'PD_SSD' | 'PD_BALANCED' | 'PD_EXTREME' | 'HYPERDISK_BALANCED' | 'HYPERDISK_EXTREME' | 'HYPERDISK_THROUGHPUT' | 'HYPERDISK_BALANCED_HIGH_AVAILABILITY' | 'HYPERDISK_ML': Optional. Indicates the type of the disk.
      - `kmsKey` string: Optional. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` Learn more about using your own encryption keys.
    - `confidentialInstanceConfig` ConfidentialInstanceConfig: A set of Confidential Instance options.
      - `confidentialInstanceType` 'CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED' | 'SEV': Optional. Defines the type of technology used by the confidential instance.
    - `containerImage` ContainerImage: Definition of a container image for starting a notebook instance with the environment installed in a container.
      - `repository` string: Required. The path to the container image repository. For example: `gcr.io/{project_id}/{image_name}`
      - `tag` string: Optional. The tag of the container image. If not specified, this defaults to the latest tag.
    - `dataDisks` DataDisk[]: Optional. Data disks attached to the VM instance. Currently supports only one data disk.
      - `diskEncryption` 'DISK_ENCRYPTION_UNSPECIFIED' | 'GMEK' | 'CMEK': Optional. Disk encryption method used on the boot and data disks, defaults to GMEK.
      - `diskSizeGb` string, int64: Optional. The size of the disk in GB attached to this VM instance, up to a maximum of 64000 GB (64 TB). If not specified, this defaults to 100.
      - `diskType` 'DISK_TYPE_UNSPECIFIED' | 'PD_STANDARD' | 'PD_SSD' | 'PD_BALANCED' | 'PD_EXTREME' | 'HYPERDISK_BALANCED' | 'HYPERDISK_EXTREME' | 'HYPERDISK_THROUGHPUT' | 'HYPERDISK_BALANCED_HIGH_AVAILABILITY' | 'HYPERDISK_ML': Optional. Indicates the type of the disk.
      - `kmsKey` string: Optional. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` Learn more about using your own encryption keys.
      - `resourcePolicies` string[]: Optional. The resource policies to apply to the data disk.
    - `disablePublicIp` boolean: Optional. If true, no external IP will be assigned to this VM instance.
    - `enableIpForwarding` boolean: Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward
    - `gpuDriverConfig` GPUDriverConfig: A GPU driver configuration
      - `customGpuDriverPath` string: Optional. Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.
      - `enableGpuDriver` boolean: Optional. Whether the end user authorizes Google Cloud to install GPU driver on this VM instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.
    - `instanceId` string: Output only. The unique ID of the Compute Engine instance resource.
    - `machineType` string: Optional. The machine type of the VM instance. https://cloud.google.com/compute/docs/machine-resource
    - `metadata` object: Optional. Custom metadata to apply to this instance.
    - `minCpuPlatform` string: Optional. The minimum CPU platform to use for this instance. The list of valid values can be found in https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones
    - `networkInterfaces` NetworkInterface[]: Optional. The network interfaces for the VM. Supports only one interface.
      - `accessConfigs` AccessConfig[]: Optional. An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If no accessConfigs specified, the instance will have an external internet access through an ephemeral external IP address.
        - `externalIp` string: Optional. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
      - `internalIp` string: Optional. An internal IP address associated with this instance. Specify an unused static internal IP address available to the subnet this instance is in, or leave this field undefined to use an IP from the subnet's ephemeral range.
      - `network` string: Optional. The name of the VPC that this VM instance is in. Format: `projects/{project_id}/global/networks/{network_id}`
      - `nicType` 'NIC_TYPE_UNSPECIFIED' | 'VIRTIO_NET' | 'GVNIC': Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
      - `subnet` string: Optional. The name of the subnet that this VM instance is in. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
    - `reservationAffinity` ReservationAffinity: A reservation that an instance can consume from.
      - `consumeReservationType` 'RESERVATION_UNSPECIFIED' | 'RESERVATION_NONE' | 'RESERVATION_ANY' | 'RESERVATION_SPECIFIC': Required. Specifies the type of reservation from which this instance can consume resources: RESERVATION_ANY (default), RESERVATION_SPECIFIC, or RESERVATION_NONE. See Consuming reserved instances for examples.
      - `key` string: Optional. Corresponds to the label key of a reservation resource. To target a RESERVATION_SPECIFIC by name, use compute.googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
      - `values` string[]: Optional. Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
    - `serviceAccounts` ServiceAccount[]: Optional. The service account that serves as an identity for the VM instance. Currently supports only one service account.
      - `email` string: Optional. Email address of the service account.
      - `scopes` string[]: Output only. The list of scopes to be made available for this service account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform
    - `shieldedInstanceConfig` ShieldedInstanceConfig: A set of Shielded Instance options. See [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). Not all combinations are valid.
      - `enableIntegrityMonitoring` boolean: Optional. Defines whether the VM instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the VM instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the VM instance is created.
      - `enableSecureBoot` boolean: Optional. Defines whether the VM instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. Disabled by default.
      - `enableVtpm` boolean: Optional. Defines whether the VM instance has the vTPM enabled.
    - `systemMetadata` object: Output only. Represents system-managed metadata for this instance: the subset of `metadata` whose keys are recognized Workbench system keys.
    - `tags` string[]: Optional. The Compute Engine network tags to add to runtime (see [Add network tags](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
    - `vmImage` VmImage: Definition of a custom Compute Engine virtual machine image for starting a notebook instance with the environment installed directly on the VM.
      - `family` string: Optional. Use this VM image family to find the image; the newest image in this family will be used.
      - `imageDescription` string: Output only. A human-readable description of the image running on the instance (for example, "Debian 11, Python 3.10"), derived at read time from the image release configuration (the source of truth). Set to "Custom" for unrecognized boot-disk images.
      - `imageId` string: Output only. The ID of the specific Compute Engine VM image the instance is currently running (for example, "workbench-instances-2603-20260918-2130-rc0").
      - `name` string: Optional. Use VM image name to find the image.
      - `project` string: Required. The name of the Google Cloud project that this VM image belongs to. Format: `{project_id}`
  - `healthInfo` object: Output only. Additional information about instance health. Example: healthInfo": { "docker_proxy_agent_status": "1", "docker_status": "1", "jupyterlab_api_status": "-1", "jupyterlab_status": "-1", "updated": "2020-10-18 09:40:03.573409" }
  - `healthState` 'HEALTH_STATE_UNSPECIFIED' | 'HEALTHY' | 'UNHEALTHY' | 'AGENT_NOT_INSTALLED' | 'AGENT_NOT_RUNNING': Output only. Instance health_state.
  - `id` string: Output only. Unique ID of the resource.
  - `instanceOwners` string[]: Optional. The owner of this instance after creation. Format: `alias@example.com` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.
  - `labels` object: Optional. Labels to apply to this instance. These can be later modified by the UpdateInstance method.
  - `name` string: Output only. Identifier. The name of this notebook instance. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`
  - `proxyUri` string: Output only. The proxy endpoint that is used to access the Jupyter notebook.
  - `satisfiesPzi` boolean: Output only. Reserved for future use for Zone Isolation.
  - `satisfiesPzs` boolean: Output only. Reserved for future use for Zone Separation.
  - `state` 'STATE_UNSPECIFIED' | 'STARTING' | 'PROVISIONING' | 'ACTIVE' | 'STOPPING' | 'STOPPED' | 'DELETED' | 'UPGRADING' | 'INITIALIZING' | 'SUSPENDING' | 'SUSPENDED' | 'ORPHANED': Output only. The state of this instance.
  - `thirdPartyProxyUrl` string: Output only. The workforce pools proxy endpoint that is used to access the Jupyter notebook.
  - `updateTime` string, google-datetime: Output only. Instance update time.
  - `upgradeHistory` UpgradeHistoryEntry[]: Output only. The upgrade history of this instance.
    - `action` 'ACTION_UNSPECIFIED' | 'UPGRADE' | 'ROLLBACK': Optional. Action. Rolloback or Upgrade.
    - `containerImage` string: Optional. The container image before this instance upgrade.
    - `createTime` string, google-datetime: Immutable. The time that this instance upgrade history entry is created.
    - `framework` string: Optional. The framework of this notebook instance.
    - `snapshot` string: Optional. The snapshot of the boot disk of this notebook instance before upgrade.
    - `state` 'STATE_UNSPECIFIED' | 'STARTED' | 'SUCCEEDED' | 'FAILED': Output only. The state of this instance upgrade history entry.
    - `targetVersion` string: Optional. Target VM Version, like m63.
    - `version` string: Optional. The version of the notebook instance before this upgrade.
    - `vmImage` string: Optional. The VM image before this instance upgrade.

## Response `200`

Successful response

- Operation: This resource represents a long-running operation that is the result of a network API call.
  - `done` boolean: If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  - `error` Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer: The status code, which should be an enum value of google.rpc.Code.
    - `details` object[]: A list of messages that carry the error details. There is a common set of message types for APIs to use.
    - `message` string: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  - `metadata` object: Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
  - `name` string: The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  - `response` object: The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.

## Changes

- **2026-12-05** `4dfb67434032`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/notebooks` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/notebooks` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/notebooks/changes/v2/projects/:projectsId/locations/:locationsId/instances/post.md)

---

[API](https://skmtc.dev/google/apis/notebooks.md) - [All operations](https://skmtc.dev/google/apis/notebooks/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/notebooks/revisions/4dfb67434032?raw)
