Skip to main content

instances

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

Overview

Nameinstances
TypeResource
Idgoogle.baremetalsolution.instances

Fields

NameDatatypeDescription
idstringOutput only. An identifier for the Instance, generated by the backend.
namestringImmutable. The resource name of this Instance. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: projects/{project}/locations/{location}/instances/{instance}
createTimestringOutput only. Create a time stamp.
firmwareVersionstringOutput only. The firmware version for the instance.
hyperthreadingEnabledbooleanTrue if you enable hyperthreading for the server, otherwise false. The default value is false.
interactiveSerialConsoleEnabledbooleanOutput only. True if the interactive serial console feature is enabled for the instance, false otherwise. The default value is false.
kmsKeyVersionstringOptional. Name of the KMS crypto key version used to encrypt the initial passwords. The key has to have ASYMMETRIC_DECRYPT purpose. Format is projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version}.
labelsobjectLabels as key value pairs.
logicalInterfacesarrayList of logical interfaces for the instance. The number of logical interfaces will be the same as number of hardware bond/nic on the chosen network template. For the non-multivlan configurations (for eg, existing servers) that use existing default network template (bondaa-bondaa), both the Instance.networks field and the Instance.logical_interfaces fields will be filled to ensure backward compatibility. For the others, only Instance.logical_interfaces will be filled.
loginInfostringOutput only. Text field about info for logging in.
lunsarrayImmutable. List of LUNs associated with this server.
machineTypestringImmutable. The server type. Available server types
networkTemplatestringInstance network template name. For eg, bondaa-bondaa, bondab-nic, etc. Generally, the template name follows the syntax of "bond" or "nic".
networksarrayOutput only. List of networks associated with this server.
osImagestringThe OS image currently installed on the server.
podstringImmutable. Pod name. Pod is an independent part of infrastructure. Instance can only be connected to the assets (networks, volumes) allocated in the same pod.
sshKeysarrayOptional. List of SSH Keys used during instance provisioning.
statestringOutput only. The state of the server.
updateTimestringOutput only. Update a time stamp.
volumesarrayInput only. List of Volumes to attach to this Instance on creation. This field won't be populated in Get/List responses.
workloadProfilestringThe workload profile for the instance.

Methods

NameAccessible byRequired ParamsDescription
getSELECTinstancesId, locationsId, projectsIdGet details about a single server.
listSELECTlocationsId, projectsIdList servers in a given project and location.
patchUPDATEinstancesId, locationsId, projectsIdUpdate details of a single server.
detach_lunEXECinstancesId, locationsId, projectsIdDetach LUN from Instance.
disable_hyperthreadingEXECinstancesId, locationsId, projectsIdPerform disable hyperthreading operation on a single server.
disable_interactive_serial_consoleEXECinstancesId, locationsId, projectsIdDisable the interactive serial console feature on an instance.
enable_hyperthreadingEXECinstancesId, locationsId, projectsIdPerform enable hyperthreading operation on a single server.
enable_interactive_serial_consoleEXECinstancesId, locationsId, projectsIdEnable the interactive serial console feature on an instance.
load_auth_infoEXECinstancesId, locationsId, projectsIdLoad auth info for a server.
reimageEXECinstancesId, locationsId, projectsIdPerform reimage operation on a single server.
renameEXECinstancesId, locationsId, projectsIdRenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.
resetEXECinstancesId, locationsId, projectsIdPerform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
startEXECinstancesId, locationsId, projectsIdStarts a server that was shutdown.
stopEXECinstancesId, locationsId, projectsIdStop a running server.

SELECT examples

List servers in a given project and location.

SELECT
id,
name,
createTime,
firmwareVersion,
hyperthreadingEnabled,
interactiveSerialConsoleEnabled,
kmsKeyVersion,
labels,
logicalInterfaces,
loginInfo,
luns,
machineType,
networkTemplate,
networks,
osImage,
pod,
sshKeys,
state,
updateTime,
volumes,
workloadProfile
FROM google.baremetalsolution.instances
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a instances resource.

/*+ update */
UPDATE google.baremetalsolution.instances
SET
name = '{{ name }}',
machineType = '{{ machineType }}',
hyperthreadingEnabled = true|false,
labels = '{{ labels }}',
luns = '{{ luns }}',
volumes = '{{ volumes }}',
osImage = '{{ osImage }}',
pod = '{{ pod }}',
networkTemplate = '{{ networkTemplate }}',
logicalInterfaces = '{{ logicalInterfaces }}',
workloadProfile = '{{ workloadProfile }}',
sshKeys = '{{ sshKeys }}',
kmsKeyVersion = '{{ kmsKeyVersion }}'
WHERE
instancesId = '{{ instancesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';