networks
Creates, updates, deletes, gets or lists a networks
resource.
Overview
Name | networks |
Type | Resource |
Id | google.baremetalsolution.networks |
Fields
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 | A network VRF. |
vrfAttachment | string | Optional. The name of a pre-existing Vrf that the network should be attached to. Format is vrfs/{vrf} . |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, networksId, projectsId | Get details of a single network. |
list | SELECT | locationsId, projectsId | List network in a given project and location. |
patch | UPDATE | locationsId, networksId, projectsId | Update details of a single network. |
rename | EXEC | locationsId, networksId, projectsId | RenameNetwork 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 }}';