Skip to main content

bare_metal_machines

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

Overview

Namebare_metal_machines
TypeResource
Idazure.nexus.bare_metal_machines

Fields

The following fields are returned by SELECT queries:

The resource has been successfully retrieved.

NameDatatypeDescription
extendedLocationobjectThe extended location of the cluster associated with the resource. (title: ExtendedLocation represents the Azure custom location where the resource will be created.)
locationstringThe geo-location where the resource lives
propertiesobjectThe list of the resource properties. (title: BareMetalMachineProperties represents the properties of a bare metal machine.)
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, bareMetalMachineNameGet properties of the provided bare metal machine.
list_by_resource_groupselectsubscriptionId, resourceGroupNameGet a list of bare metal machines in the provided resource group.
list_by_subscriptionselectsubscriptionIdGet a list of bare metal machines in the provided subscription.
create_or_updateinsertsubscriptionId, resourceGroupName, bareMetalMachineName, data__extendedLocation, data__propertiesCreate a new bare metal machine or update the properties of the existing one.
All customer initiated requests will be rejected as the life cycle of this resource is managed by the system.
updateupdatesubscriptionId, resourceGroupName, bareMetalMachineNamePatch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently.
deletedeletesubscriptionId, resourceGroupName, bareMetalMachineNameDelete the provided bare metal machine.
All customer initiated requests will be rejected as the life cycle of this resource is managed by the system.
cordonexecsubscriptionId, resourceGroupName, bareMetalMachineNameCordon the provided bare metal machine's Kubernetes node.
power_offexecsubscriptionId, resourceGroupName, bareMetalMachineNamePower off the provided bare metal machine.
reimageexecsubscriptionId, resourceGroupName, bareMetalMachineNameReimage the provided bare metal machine.
replaceexecsubscriptionId, resourceGroupName, bareMetalMachineNameReplace the provided bare metal machine.
restartexecsubscriptionId, resourceGroupName, bareMetalMachineNameRestart the provided bare metal machine.
run_commandexecsubscriptionId, resourceGroupName, bareMetalMachineName, script, limitTimeSecondsRun the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available.
run_data_extractsexecsubscriptionId, resourceGroupName, bareMetalMachineName, commands, limitTimeSecondsRun one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available.
run_read_commandsexecsubscriptionId, resourceGroupName, bareMetalMachineName, commands, limitTimeSecondsRun one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available.
startexecsubscriptionId, resourceGroupName, bareMetalMachineNameStart the provided bare metal machine.
uncordonexecsubscriptionId, resourceGroupName, bareMetalMachineNameUncordon the provided bare metal machine's Kubernetes node.

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
bareMetalMachineNamestringThe name of the bare metal machine.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Get properties of the provided bare metal machine.

SELECT
extendedLocation,
location,
properties,
tags
FROM azure.nexus.bare_metal_machines
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND bareMetalMachineName = '{{ bareMetalMachineName }}' -- required
;

INSERT examples

Create a new bare metal machine or update the properties of the existing one.
All customer initiated requests will be rejected as the life cycle of this resource is managed by the system.

INSERT INTO azure.nexus.bare_metal_machines (
data__extendedLocation,
data__properties,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
bareMetalMachineName
)
SELECT
'{{ extendedLocation }}' /* required */,
'{{ properties }}' /* required */,
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ bareMetalMachineName }}'
RETURNING
extendedLocation,
location,
properties,
tags
;

UPDATE examples

Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently.

UPDATE azure.nexus.bare_metal_machines
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND bareMetalMachineName = '{{ bareMetalMachineName }}' --required
RETURNING
extendedLocation,
location,
properties,
tags;

DELETE examples

Delete the provided bare metal machine.
All customer initiated requests will be rejected as the life cycle of this resource is managed by the system.

DELETE FROM azure.nexus.bare_metal_machines
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND bareMetalMachineName = '{{ bareMetalMachineName }}' --required
;

Lifecycle Methods

Cordon the provided bare metal machine's Kubernetes node.

EXEC azure.nexus.bare_metal_machines.cordon 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@bareMetalMachineName='{{ bareMetalMachineName }}' --required
@@json=
'{
"evacuate": "{{ evacuate }}"
}'
;