instances
Creates, updates, deletes, gets or lists an instances
resource.
Overview
Name | instances |
Type | Resource |
Id | google.baremetalsolution.instances |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
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 (google-datetime) | 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 (google-datetime) | 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. |
Successful response
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 (google-datetime) | 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 (google-datetime) | 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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , instancesId | Get details about a single server. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter | List servers in a given project and location. |
patch | update | projectsId , locationsId , instancesId | updateMask | Update details of a single server. |
load_auth_info | exec | projectsId , locationsId , instancesId | Load auth info for a server. | |
reimage | exec | projectsId , locationsId , instancesId | Perform reimage operation on a single server. | |
enable_hyperthreading | exec | projectsId , locationsId , instancesId | Perform enable hyperthreading operation on a single server. | |
disable_hyperthreading | exec | projectsId , locationsId , instancesId | Perform disable hyperthreading operation on a single server. | |
rename | exec | projectsId , locationsId , instancesId | RenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated. | |
reset | exec | projectsId , locationsId , instancesId | Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on. | |
start | exec | projectsId , locationsId , instancesId | Starts a server that was shutdown. | |
stop | exec | projectsId , locationsId , instancesId | Stop a running server. | |
enable_interactive_serial_console | exec | projectsId , locationsId , instancesId | Enable the interactive serial console feature on an instance. | |
disable_interactive_serial_console | exec | projectsId , locationsId , instancesId | Disable the interactive serial console feature on an instance. | |
detach_lun | exec | projectsId , locationsId , instancesId | Detach 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.
Name | Datatype | Description |
---|---|---|
instancesId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
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;
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 projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
UPDATE
examples
- patch
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
- reimage
- enable_hyperthreading
- disable_hyperthreading
- rename
- reset
- start
- stop
- enable_interactive_serial_console
- disable_interactive_serial_console
- detach_lun
Load auth info for a server.
EXEC google.baremetalsolution.instances.load_auth_info
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;
Perform reimage operation on a single server.
EXEC google.baremetalsolution.instances.reimage
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"osImage": "{{ osImage }}",
"kmsKeyVersion": "{{ kmsKeyVersion }}",
"sshKeys": "{{ sshKeys }}"
}';
Perform enable hyperthreading operation on a single server.
EXEC google.baremetalsolution.instances.enable_hyperthreading
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;
Perform disable hyperthreading operation on a single server.
EXEC google.baremetalsolution.instances.disable_hyperthreading
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;
RenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.
EXEC google.baremetalsolution.instances.rename
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"newInstanceId": "{{ newInstanceId }}"
}';
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
EXEC google.baremetalsolution.instances.reset
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;
Starts a server that was shutdown.
EXEC google.baremetalsolution.instances.start
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;
Stop a running server.
EXEC google.baremetalsolution.instances.stop
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;
Enable the interactive serial console feature on an instance.
EXEC google.baremetalsolution.instances.enable_interactive_serial_console
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;
Disable the interactive serial console feature on an instance.
EXEC google.baremetalsolution.instances.disable_interactive_serial_console
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required;
Detach LUN from Instance.
EXEC google.baremetalsolution.instances.detach_lun
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"lun": "{{ lun }}",
"skipReboot": {{ skipReboot }}
}';