Skip to main content

networks

Creates, updates, deletes, gets or lists a networks resource.

Overview

Namenetworks
TypeResource
Idgoogle.baremetalsolution.networks

Fields

NameDatatypeDescription
idstringAn identifier for the Network, generated by the backend.
namestringOutput 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}
cidrstringThe cidr of the Network.
gatewayIpstringOutput only. Gateway ip address.
ipAddressstringIP address configured.
jumboFramesEnabledbooleanWhether network uses standard frames or jumbo ones.
labelsobjectLabels as key value pairs.
macAddressarrayList of physical interfaces.
mountPointsarrayInput only. List of mount points to attach the network to.
podstringImmutable. Pod name. Pod is an independent part of infrastructure. Network can only be connected to the assets (instances, nfsshares) allocated in the same pod.
reservationsarrayList 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.
servicesCidrstringIP range for reserved for services (e.g. NFS).
statestringThe Network state.
typestringThe type of this network.
vlanIdstringThe vlan id of the Network.
vrfobjectA network VRF.
vrfAttachmentstringOptional. The name of a pre-existing Vrf that the network should be attached to. Format is vrfs/{vrf}.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, networksId, projectsIdGet details of a single network.
listSELECTlocationsId, projectsIdList network in a given project and location.
patchUPDATElocationsId, networksId, projectsIdUpdate details of a single network.
renameEXEClocationsId, networksId, projectsIdRenameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated.

SELECT examples

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 locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a networks resource.

/*+ update */
UPDATE google.baremetalsolution.networks
SET
type = '{{ type }}',
ipAddress = '{{ ipAddress }}',
macAddress = '{{ macAddress }}',
state = '{{ state }}',
vlanId = '{{ vlanId }}',
cidr = '{{ cidr }}',
vrf = '{{ vrf }}',
vrfAttachment = '{{ vrfAttachment }}',
labels = '{{ labels }}',
servicesCidr = '{{ servicesCidr }}',
reservations = '{{ reservations }}',
pod = '{{ pod }}',
mountPoints = '{{ mountPoints }}',
jumboFramesEnabled = true|false
WHERE
locationsId = '{{ locationsId }}'
AND networksId = '{{ networksId }}'
AND projectsId = '{{ projectsId }}';