Update Machine

View as Markdown
Update a Machine Instance Type attribute updates, maintenance attribute updates and labels updates must be specified in separate requests. They cannot be processed at the same time. Some attributes can only be updated by Provider, while others can be updated by Provider or a Privileged Tenant.

Authentication

AuthorizationBearer
``` export JWT_BEARER_TOKEN="<jwt-bearer-token>" # Example org name: "acme-inc export ORG_NAME=<org-name> # Use the JWT bearer token in your API request auth header: curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current ```

Path parameters

orgstringRequired
Name of the Org
machineIdstringRequired
ID of the Machine

Request

This endpoint expects an object.
instanceTypeIdstring or nullOptionalformat: "uuid"2-256 characters
Update the Instance Type of the Machine. Cannot be specified when clearing Instance Type. Can only be updated by Provider.
clearInstanceTypeboolean or nullOptional
Set to true to clear the existing Instance Type. Cannot be specified if Instance Type ID is specified. Can only be set by Provider.
setMaintenanceModeboolean or nullOptional

Set to true to enable maintenance mode and to false to disable maintenance mode. Can be set by Provider or Privileged Tenant.

maintenanceMessagestring or nullOptional5-256 characters
Optional message describing the reason for moving Machine into maintenance mode. Can be updated by Provider or Privileged Tenant.
labelsmap from strings to stringsOptional
Machine labels will be overwritten, include existing labels to preserve them. Can be updated by Provider or Privileged Tenant.
onlineRepairobjectOptional

Request to enter/exit online repair

healthIssueobjectOptional

Required when onlineRepair.enabled is true. Must not be set when exiting online repair (onlineRepair.enabled false).

Response

OK
idstringRead-only
Unique ID of Machine
infrastructureProviderIdstringRead-onlyformat: "uuid"
ID of the Provider that owns the Machine
siteIdstringformat: "uuid"
ID of the Site the Machine belongs to
instanceTypeIdstring or nullformat: "uuid"
ID of the Instance Type, if assigned
instanceIdstring or nullformat: "uuid"
ID of the Instance if this Machine is assigned to one
tenantIdstring or nullformat: "uuid"
ID of the Tenant that owns the Instance if the Machine is assigned to one
controllerMachineIdstring
ID of the Machine at Site, now same as the primary ID
controllerMachineTypestring or null

Denotes architecture (x86 vs ARM) of the Machine

hwSkuDeviceTypestring or null
SKU derived device type of the machine, e.g. cpu, gpu, cache, storage, etc.
vendorstring or null
Name of the vendor of the Machine
productNamestring or null
Product name of the Machine
serialNumberstring or null
Serial number of the Machine, only visible to Provider
machineCapabilitieslist of objects
List of capabilities of the machine
machineInterfaceslist of objects
List of admin interfaces of the machine
maintenanceMessagestring or null
If the Machine is in maintenance mode, this message will typically describe the reason and how long it is expected to be in maintenance
healthobject
Health information about the machine
metadataobject

Only available to Providers. Returned if the includeMetadata query parameter is specified. Otherwise attribute is omitted from response.

labelsmap from strings to strings

User-specified Machine labels

statusenum
Status represents the status of the machine
isUsableByTenantbooleanRead-only
Indicates whether the machine is usable by or currently in use by a tenant.
statusHistorylist of objects
Chronological status history for the Machine
createddatetimeRead-only

Date/time when the Machine was created

updateddatetimeRead-only

Date/time when the Machine was last updated

Errors

400
Bad Request Error
403
Forbidden Error