Creates a new Instance in a given project and location.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: notebooks1 --scope <scope> projects locations-instances-create ...

Required Scalar Argument

  • <parent> (string)
    • Required. Format: parent=projects/{project_id}/locations/{location}

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

Instance:
  accelerator-config:
    core-count: int64
    type: string
  boot-disk-size-gb: string
  boot-disk-type: string
  can-ip-forward: boolean
  container-image:
    repository: string
    tag: string
  create-time: string
  creator: string
  custom-gpu-driver-path: string
  data-disk-size-gb: string
  data-disk-type: string
  disk-encryption: string
  install-gpu-driver: boolean
  instance-migration-eligibility:
    errors: [string]
    warnings: [string]
  instance-owners: [string]
  kms-key: string
  labels: { string: string }
  machine-type: string
  metadata: { string: string }
  migrated: boolean
  name: string
  network: string
  nic-type: string
  no-proxy-access: boolean
  no-public-ip: boolean
  no-remove-data-disk: boolean
  post-startup-script: string
  proxy-uri: string
  reservation-affinity:
    consume-reservation-type: string
    key: string
    values: [string]
  service-account: string
  service-account-scopes: [string]
  shielded-instance-config:
    enable-integrity-monitoring: boolean
    enable-secure-boot: boolean
    enable-vtpm: boolean
  state: string
  subnet: string
  tags: [string]
  update-time: string
  vm-image:
    image-family: string
    image-name: string
    project: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .accelerator-config core-count=-56
    • Count of cores of this accelerator.
  • type=eos

    • Type of this accelerator.
  • .. boot-disk-size-gb=labore

    • Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.
  • boot-disk-type=sed
    • Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (PD_STANDARD).
  • can-ip-forward=false
    • Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward
  • container-image repository=sed
    • Required. The path to the container image repository. For example: gcr.io/{project_id}/{image_name}
  • tag=no

    • The tag of the container image. If not specified, this defaults to the latest tag.
  • .. create-time=stet

    • Output only. Instance creation time.
  • creator=kasd
    • Output only. Email address of entity that sent original CreateInstance request.
  • custom-gpu-driver-path=et
    • Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.
  • data-disk-size-gb=sed
    • Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.
  • data-disk-type=et
    • Input only. The type of the data disk attached to this instance, defaults to standard persistent disk (PD_STANDARD).
  • disk-encryption=et
    • Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
  • install-gpu-driver=false
    • Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.
  • instance-migration-eligibility errors=erat
    • Output only. Certain configurations make the UmN ineligible for an automatic migration. A manual migration is required.
    • Each invocation of this argument appends the given value to the array.
  • warnings=sed

    • Output only. Certain configurations will be defaulted during the migration.
    • Each invocation of this argument appends the given value to the array.
  • .. instance-owners=duo

    • Input only. 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.
    • Each invocation of this argument appends the given value to the array.
  • kms-key=dolore
    • Input only. 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.
  • labels=key=et
    • Labels to apply to this instance. These can be later modified by the setLabels method.
    • the value will be associated with the given key
  • machine-type=voluptua.
  • metadata=key=amet.
    • Custom metadata to apply to this instance. For example, to specify a Cloud Storage bucket for automatic backup, you can use the gcs-data-bucket metadata tag. Format: &#34;--metadata=gcs-data-bucket=``BUCKET&#39;&#39;&#34;.
    • the value will be associated with the given key
  • migrated=false
    • Output only. Bool indicating whether this notebook has been migrated to a Workbench Instance
  • name=diam
    • Output only. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instance_id}
  • network=dolor
    • The name of the VPC that this instance is in. Format: projects/{project_id}/global/networks/{network_id}
  • nic-type=et
    • Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
  • no-proxy-access=false
    • If true, the notebook instance will not register with the proxy.
  • no-public-ip=false
    • If true, no external IP will be assigned to this instance.
  • no-remove-data-disk=false
    • Input only. If true, the data disk will not be auto deleted when deleting the instance.
  • post-startup-script=vero
    • Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (gs://path-to-file/file-name).
  • proxy-uri=invidunt
    • Output only. The proxy endpoint that is used to access the Jupyter notebook.
  • reservation-affinity consume-reservation-type=stet
    • Optional. Type of reservation to consume
  • key=vero
    • Optional. Corresponds to the label key of reservation resource.
  • values=elitr

    • Optional. Corresponds to the label values of reservation resource.
    • Each invocation of this argument appends the given value to the array.
  • .. service-account=lorem

    • The service account on this instance, giving access to other Google Cloud services. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the Compute Engine default service account is used.
  • service-account-scopes=diam
    • Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following scopes are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
    • Each invocation of this argument appends the given value to the array.
  • shielded-instance-config enable-integrity-monitoring=true
    • Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. Enabled by default.
  • enable-secure-boot=false
    • Defines whether the 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.
  • enable-vtpm=true

    • Defines whether the instance has the vTPM enabled. Enabled by default.
  • .. state=consetetur

    • Output only. The state of this instance.
  • subnet=voluptua.
    • The name of the subnet that this instance is in. Format: projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}
  • tags=et
    • Optional. The Compute Engine tags to add to runtime (see Tagging instances).
    • Each invocation of this argument appends the given value to the array.
  • update-time=erat
    • Output only. Instance update time.
  • vm-image image-family=consetetur
    • Use this VM image family to find the image; the newest image in this family will be used.
  • image-name=amet.
    • Use VM image name to find the image.
  • project=sed
    • Required. The name of the Google Cloud project that this VM image belongs to. Format: {project_id}

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p instance-id=string
    • Required. User-defined unique ID of this instance.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").