instances
Creates, updates, deletes, gets or lists a instances
resource.
Overview
Name | instances |
Type | Resource |
Id | google.baremetalsolution.instances |
Fields
Name | Datatype | Description |
---|---|---|
id | string | Output only. An identifier for the Instance , generated by the backend. |
name | string | Immutable. 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} |
createTime | string | Output only. Create a time stamp. |
firmwareVersion | string | Output only. The firmware version for the instance. |
hyperthreadingEnabled | boolean | True if you enable hyperthreading for the server, otherwise false. The default value is false. |
interactiveSerialConsoleEnabled | boolean | Output only. True if the interactive serial console feature is enabled for the instance, false otherwise. The default value is false. |
kmsKeyVersion | string | Optional. 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} . |
labels | object | Labels as key value pairs. |
logicalInterfaces | array | List 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. |
loginInfo | string | Output only. Text field about info for logging in. |
luns | array | Immutable. List of LUNs associated with this server. |
machineType | string | Immutable. The server type. Available server types |
networkTemplate | string | Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. Generally, the template name follows the syntax of "bond" or "nic". |
networks | array | Output only. List of networks associated with this server. |
osImage | string | The OS image currently installed on the server. |
pod | string | Immutable. Pod name. Pod is an independent part of infrastructure. Instance can only be connected to the assets (networks, volumes) allocated in the same pod. |
sshKeys | array | Optional. List of SSH Keys used during instance provisioning. |
state | string | Output only. The state of the server. |
updateTime | string | Output only. Update a time stamp. |
volumes | array | Input only. List of Volumes to attach to this Instance on creation. This field won't be populated in Get/List responses. |
workloadProfile | string | The workload profile for the instance. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | instancesId, locationsId, projectsId | Get details about a single server. |
list | SELECT | locationsId, projectsId | List servers in a given project and location. |
patch | UPDATE | instancesId, locationsId, projectsId | Update details of a single server. |
detach_lun | EXEC | instancesId, locationsId, projectsId | Detach LUN from Instance. |
disable_hyperthreading | EXEC | instancesId, locationsId, projectsId | Perform disable hyperthreading operation on a single server. |
disable_interactive_serial_console | EXEC | instancesId, locationsId, projectsId | Disable the interactive serial console feature on an instance. |
enable_hyperthreading | EXEC | instancesId, locationsId, projectsId | Perform enable hyperthreading operation on a single server. |
enable_interactive_serial_console | EXEC | instancesId, locationsId, projectsId | Enable the interactive serial console feature on an instance. |
load_auth_info | EXEC | instancesId, locationsId, projectsId | Load auth info for a server. |
reimage | EXEC | instancesId, locationsId, projectsId | Perform reimage operation on a single server. |
rename | EXEC | instancesId, locationsId, projectsId | RenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated. |
reset | EXEC | instancesId, locationsId, projectsId | Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on. |
start | EXEC | instancesId, locationsId, projectsId | Starts a server that was shutdown. |
stop | EXEC | instancesId, locationsId, projectsId | Stop 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 }}';