networks
Creates, updates, deletes, gets or lists a networks
resource.
Overview
Name | networks |
Type | Resource |
Id | google.baremetalsolution.networks |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
id | string | An identifier for the Network , generated by the backend. |
name | string | Output only. The resource name of this Network . Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: projects/{project}/locations/{location}/networks/{network} |
cidr | string | The cidr of the Network. |
gatewayIp | string | Output only. Gateway ip address. |
ipAddress | string | IP address configured. |
jumboFramesEnabled | boolean | Whether network uses standard frames or jumbo ones. |
labels | object | Labels as key value pairs. |
macAddress | array | List of physical interfaces. |
mountPoints | array | Input only. List of mount points to attach the network to. |
pod | string | Immutable. Pod name. Pod is an independent part of infrastructure. Network can only be connected to the assets (instances, nfsshares) allocated in the same pod. |
reservations | array | List of IP address reservations in this network. When updating this field, an error will be generated if a reservation conflicts with an IP address already allocated to a physical server. |
servicesCidr | string | IP range for reserved for services (e.g. NFS). |
state | string | The Network state. |
type | string | The type of this network. |
vlanId | string | The vlan id of the Network. |
vrf | object | The Vrf for the Network. Use this only if a new Vrf needs to be created. (id: VRF) |
vrfAttachment | string | Optional. The name of a pre-existing Vrf that the network should be attached to. Format is vrfs/{vrf} . |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | An identifier for the Network , generated by the backend. |
name | string | Output only. The resource name of this Network . Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: projects/{project}/locations/{location}/networks/{network} |
cidr | string | The cidr of the Network. |
gatewayIp | string | Output only. Gateway ip address. |
ipAddress | string | IP address configured. |
jumboFramesEnabled | boolean | Whether network uses standard frames or jumbo ones. |
labels | object | Labels as key value pairs. |
macAddress | array | List of physical interfaces. |
mountPoints | array | Input only. List of mount points to attach the network to. |
pod | string | Immutable. Pod name. Pod is an independent part of infrastructure. Network can only be connected to the assets (instances, nfsshares) allocated in the same pod. |
reservations | array | List of IP address reservations in this network. When updating this field, an error will be generated if a reservation conflicts with an IP address already allocated to a physical server. |
servicesCidr | string | IP range for reserved for services (e.g. NFS). |
state | string | The Network state. |
type | string | The type of this network. |
vlanId | string | The vlan id of the Network. |
vrf | object | The Vrf for the Network. Use this only if a new Vrf needs to be created. (id: VRF) |
vrfAttachment | string | Optional. The name of a pre-existing Vrf that the network should be attached to. Format is vrfs/{vrf} . |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , networksId | Get details of a single network. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter | List network in a given project and location. |
patch | update | projectsId , locationsId , networksId | updateMask | Update details of a single network. |
rename | exec | projectsId , locationsId , networksId | RenameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
networksId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get details of a single network.
SELECT
id,
name,
cidr,
gatewayIp,
ipAddress,
jumboFramesEnabled,
labels,
macAddress,
mountPoints,
pod,
reservations,
servicesCidr,
state,
type,
vlanId,
vrf,
vrfAttachment
FROM google.baremetalsolution.networks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND networksId = '{{ networksId }}' -- required;
List network in a given project and location.
SELECT
id,
name,
cidr,
gatewayIp,
ipAddress,
jumboFramesEnabled,
labels,
macAddress,
mountPoints,
pod,
reservations,
servicesCidr,
state,
type,
vlanId,
vrf,
vrfAttachment
FROM google.baremetalsolution.networks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
UPDATE
examples
- patch
Update details of a single network.
UPDATE google.baremetalsolution.networks
SET
data__id = '{{ id }}',
data__type = '{{ type }}',
data__ipAddress = '{{ ipAddress }}',
data__macAddress = '{{ macAddress }}',
data__state = '{{ state }}',
data__vlanId = '{{ vlanId }}',
data__cidr = '{{ cidr }}',
data__vrf = '{{ vrf }}',
data__vrfAttachment = '{{ vrfAttachment }}',
data__labels = '{{ labels }}',
data__servicesCidr = '{{ servicesCidr }}',
data__reservations = '{{ reservations }}',
data__pod = '{{ pod }}',
data__mountPoints = '{{ mountPoints }}',
data__jumboFramesEnabled = {{ jumboFramesEnabled }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND networksId = '{{ networksId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
Lifecycle Methods
- rename
RenameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated.
EXEC google.baremetalsolution.networks.rename
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@networksId='{{ networksId }}' --required
@@json=
'{
"newNetworkId": "{{ newNetworkId }}"
}';