Skip to main content

instances

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

Overview

Nameinstances
TypeResource
Idgoogle.baremetalsolution.instances

Fields

The following fields are returned by SELECT queries:

Successful response

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}
createTimestring (google-datetime)Output 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.
updateTimestring (google-datetime)Output 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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, instancesIdGet details about a single server.
listselectprojectsId, locationsIdpageSize, pageToken, filterList servers in a given project and location.
patchupdateprojectsId, locationsId, instancesIdupdateMaskUpdate details of a single server.
load_auth_infoexecprojectsId, locationsId, instancesIdLoad auth info for a server.
reimageexecprojectsId, locationsId, instancesIdPerform reimage operation on a single server.
enable_hyperthreadingexecprojectsId, locationsId, instancesIdPerform enable hyperthreading operation on a single server.
disable_hyperthreadingexecprojectsId, locationsId, instancesIdPerform disable hyperthreading operation on a single server.
renameexecprojectsId, locationsId, instancesIdRenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.
resetexecprojectsId, locationsId, instancesIdPerform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
startexecprojectsId, locationsId, instancesIdStarts a server that was shutdown.
stopexecprojectsId, locationsId, instancesIdStop a running server.
enable_interactive_serial_consoleexecprojectsId, locationsId, instancesIdEnable the interactive serial console feature on an instance.
disable_interactive_serial_consoleexecprojectsId, locationsId, instancesIdDisable the interactive serial console feature on an instance.
detach_lunexecprojectsId, locationsId, instancesIdDetach LUN from Instance.

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.

NameDatatypeDescription
instancesIdstring
locationsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Get details about a single server.

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

UPDATE examples

Update details of a single server.

UPDATE google.baremetalsolution.instances
SET
data__name = '{{ name }}',
data__machineType = '{{ machineType }}',
data__hyperthreadingEnabled = {{ hyperthreadingEnabled }},
data__labels = '{{ labels }}',
data__luns = '{{ luns }}',
data__volumes = '{{ volumes }}',
data__osImage = '{{ osImage }}',
data__pod = '{{ pod }}',
data__networkTemplate = '{{ networkTemplate }}',
data__logicalInterfaces = '{{ logicalInterfaces }}',
data__workloadProfile = '{{ workloadProfile }}',
data__sshKeys = '{{ sshKeys }}',
data__kmsKeyVersion = '{{ kmsKeyVersion }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

Lifecycle Methods

Load auth info for a server.

EXEC google.baremetalsolution.instances.load_auth_info 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;