Requires authorization
Creates an instance resource in the specified project using the data included in the request. Try it now .
Request
HTTP request
POST https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances
Parameters
Parameter name | Value | Description |
---|---|---|
Path parameters | ||
project
|
string
|
Project ID of the project scoping this request. |
zone
|
string
|
Name of the zone scoping this request. |
Authorization
This request requires authorization with the following scope ( read more about authentication and authorization ).
Scope |
---|
https://www.googleapis.com/auth/compute
|
Request body
In the request body, supply an Instances resource with the following properties:
Property name | Value | Description | Notes |
---|---|---|---|
Required Properties | |||
machineType
|
string
|
Fully-qualified URL of the machine type resource to use for the instance. This is provided by the client during instance creation. | |
name
|
string
|
Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply
with RFC1035 . Specifically, the name must be 1-63 characters long and match the regular expression
[a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
|
networkInterfaces[]
|
list
|
An array of configurations for this instance. This specifies how this instance can interact with other network services, such as connecting to the internet. Currently,
ONE_TO_ONE_NAT
is the only access config supported. If there are no
accessConfigs
specified, then this instance will have no external internet access.
|
|
networkInterfaces[].
network
|
string
|
Fully-qualified URL of the Network resource to which this interface applies. | |
networkInterfaces[].
accessConfigs[]
|
list
|
An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently,
ONE_TO_ONE_NAT
is the only access config supported. If there are no
accessConfigs
specified, then this instance will have no external internet access.
|
|
disks[]
|
list
|
An array of persistent disks. You must supply a boot disk as the first
disk in this array and mark it as a boot disk using the
disks[].boot
property.
|