Requires authorization
Creates a network 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/global/networks
Parameters
Parameter name | Value | Description |
---|---|---|
Path parameters | ||
project
|
string
|
Project ID for 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 a Networks resource with the following properties:
Property name | Value | Description | Notes |
---|---|---|---|
Required Properties | |||
IPv4Range
|
string
|
The range of internal addresses that are legal on this network. This range is a
CIDR
specification, for example:
192.168.0.0/16
. Provided by the client when the network is created.
|
|
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. |
Response
If successful, this method returns a GlobalOperations resource in the response body.
{ "kind": "compute#operation", "id": unsigned long, "creationTimestamp": string, "name": string, "zone": string, "clientOperationId": string, "operationType": string, "targetLink": string, "targetId": unsigned long, "status": string, "statusMessage": string, "user": string, "progress": integer, "insertTime": string, "startTime": string, "endTime": string, "error": { "errors": [ { "code": string, "location": string, "message": string } ] }, "warnings": [ { "code": string, "message": string, "data": [ { "key": string, "value": string } ] } ], "httpErrorStatusCode": integer, "httpErrorMessage": string, "selfLink": string, "region": string }
Property name | Value | Description | Notes |
---|---|---|---|
kind
|
string
|
Type of the resource. | |
id
|
unsigned long
|
Unique identifier for the resource; defined by the server (output only). | |
creationTimestamp
|
string
|
Creation timestamp in RFC3339 text format (output only). | |
name
|
string
|
Name of the resource (output only). | |
zone
|
string
|
URL of the zone where the operation resides (output only). | |
clientOperationId
|
string
|
An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only). | |
operationType
|
string
|
Type of the operation. Examples include "insert", "update", and "delete" (output only). | |
targetLink
|
string
|
URL of the resource the operation is mutating (output only). | |
targetId
|
unsigned long
|
Unique target id which identifies a particular incarnation of the target (output only). | |
status
|
string
|
Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
Acceptable values are:
|
|
statusMessage
|
string
|
An optional textual description of the current status of the operation (output only). | |
user
|
string
|
User who requested the operation, for example "[email protected]" (output only). | |
progress
|
integer
|
An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only). | |
insertTime
|
string
|
The time that this operation was requested. This is in RFC 3339 format (output only). | |
startTime
|
string
|
The time that this operation was started by the server. This is in RFC 3339 format (output only). | |
endTime
|
string
|
The time that this operation was completed. This is in RFC 3339 format (output only). | |
error
|
object
|
If errors occurred during processing of this operation, this field will be populated (output only). | |
error.
errors[]
|
list
|
The array of errors encountered while processing this operation. | |
error.errors[].
code
|
string
|
The error type identifier for this error. | |
error.errors[].
location
|
string
|
Indicates the field in the request which caused the error. This property is optional. | |
error.errors[].
message
|
string
|
An optional, human-readable error message. | |
warnings[]
|
list
|
If warning messages generated during processing of this operation, this field will be populated (output only). | |
warnings[].
code
|
string
|
The warning type identifier for this warning.
Acceptable values are:
|
|
warnings[].
message
|
string
|
Optional human-readable details for this warning. | |
warnings[].
data[]
|
list
|
Metadata for this warning in 'key: value' format. | |
warnings[].data[].
key
|
string
|
A key for the warning data. | |
warnings[].data[].
value
|
string
|
A warning data value corresponding to the key. | |
httpErrorStatusCode
|
integer
|
If operation fails, the HTTP error status code returned, e.g. 404. (output only). | |
httpErrorMessage
|
string
|
If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only). | |
selfLink
|
string
|
Server defined URL for the resource (output only). | |
region
|
string
|
URL of the region where the operation resides (output only). |
Try it!
Use the APIs Explorer below to call this method on live data and see the response.