Skip to main content

bare_metal_machines

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

Overview

Namebare_metal_machines
TypeResource
Idazure_extras.network_cloud.bare_metal_machines

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
actionStatesarrayThe current state of any in progress or completed actions. The most recent known instance of each action type is shown.
associatedResourceIdsarrayThe list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network.
bmcConnectionStringstringThe connection string for the baseboard management controller including IP address and protocol. Required.
bmcCredentialsobjectThe credentials of the baseboard management controller on this bare metal machine. Required.
bmcIpv4AddressstringThe IPv4 address of the BMC interface for the bare metal machine.
bmcIpv6AddressstringThe IPv6 address of the BMC interface for the bare metal machine.
bmcMacAddressstringThe MAC address of the BMC device. Required.
bootMacAddressstringThe MAC address of a NIC connected to the PXE network. Required.
caCertificateobjectThe CA certificate information issued by the platform for connecting to TLS interfaces for the bare metal machine. Callers add this certificate to the trusted CA store on the Kubernetes control plane nodes to allow secure communication with the bare metal machine.
clusterIdstringThe resource ID of the cluster this bare metal machine is associated with.
cordonStatusstringThe cordon status of the bare metal machine. Known values are: "Cordoned" and "Uncordoned". (Cordoned, Uncordoned)
detailedStatusstringThe more detailed status of the bare metal machine. Known values are: "Preparing", "Error", "Available", "Provisioning", "Provisioned", and "Deprovisioning". (Preparing, Error, Available, Provisioning, Provisioned, Deprovisioning)
detailedStatusMessagestringThe descriptive message about the current detailed status.
etagstring"If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.").
extendedLocationobjectThe extended location of the resource. This property is required when creating the resource. Required.
hardwareInventoryobjectThe hardware inventory, including information acquired from the model/sku information and from the ironic inspector.
hardwareValidationStatusobjectThe details of the latest hardware validation performed for this bare metal machine.
hybridAksClustersAssociatedIdsarrayField Deprecated. These fields will be empty/omitted. The list of the resource IDs for the HybridAksClusters that have nodes hosted on this bare metal machine.
kubernetesNodeNamestringThe name of this machine represented by the host object in the Cluster's Kubernetes control plane.
kubernetesVersionstringThe version of Kubernetes running on this machine.
locationstringThe geo-location where the resource lives. Required.
machineClusterVersionstringThe cluster version that has been applied to this machine during deployment or a version update.
machineDetailsstringThe custom details provided by the customer. Required.
machineNamestringThe OS-level hostname assigned to this machine. Required.
machineRolesarrayThe list of roles that are assigned to the cluster node running on this machine.
machineSkuIdstringThe unique internal identifier of the bare metal machine SKU. Required.
monitoringConfigurationStatusobjectThe monitoring configuration status of the bare metal machine.
oamIpv4AddressstringThe IPv4 address that is assigned to the bare metal machine during the cluster deployment.
oamIpv6AddressstringThe IPv6 address that is assigned to the bare metal machine during the cluster deployment.
osImagestringThe image that is currently provisioned to the OS disk.
powerStatestringThe power state derived from the baseboard management controller. Known values are: "On" and "Off". (On, Off)
provisioningStatestringThe provisioning state of the bare metal machine. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Accepted)
rackIdstringThe resource ID of the rack where this bare metal machine resides. Required.
rackSlotintegerThe rack slot in which this bare metal machine is located, ordered from the bottom up i.e. the lowest slot is 1. Required.
readyStatestringThe indicator of whether the bare metal machine is ready to receive workloads. Known values are: "True" and "False". (True, False)
runtimeProtectionStatusobjectThe runtime protection status of the bare metal machine.
secretRotationStatusarrayThe list of statuses that represent secret rotation activity.
serialNumberstringThe serial number of the bare metal machine. Required.
serviceTagstringThe discovered value of the machine's service tag.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
virtualMachinesAssociatedIdsarrayField Deprecated. These fields will be empty/omitted. The list of the resource IDs for the VirtualMachines that are hosted on this bare metal machine.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, bare_metal_machine_name, subscription_idGet properties of the provided bare metal machine.
list_by_resource_groupselectresource_group_name, subscription_id$top, $skipTokenGet a list of bare metal machines in the provided resource group.
list_by_subscriptionselectsubscription_id$top, $skipTokenGet a list of bare metal machines in the provided subscription.
create_or_updateinsertresource_group_name, bare_metal_machine_name, subscription_id, location, properties, extendedLocationCreate 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.
updateupdateresource_group_name, bare_metal_machine_name, subscription_idPatch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently.
create_or_updatereplaceresource_group_name, bare_metal_machine_name, subscription_id, location, properties, extendedLocationCreate 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.
deletedeleteresource_group_name, bare_metal_machine_name, subscription_idDelete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system.
cordonexecresource_group_name, bare_metal_machine_name, subscription_idCordon the provided bare metal machine's Kubernetes node.
power_offexecresource_group_name, bare_metal_machine_name, subscription_idPower off the provided bare metal machine.
reimageexecresource_group_name, bare_metal_machine_name, subscription_idReimage the provided bare metal machine.
replaceexecresource_group_name, bare_metal_machine_name, subscription_idReplace the provided bare metal machine.
restartexecresource_group_name, bare_metal_machine_name, subscription_idRestart the provided bare metal machine.
run_commandexecresource_group_name, bare_metal_machine_name, subscription_id, limitTimeSeconds, scriptRun 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_extractsexecresource_group_name, bare_metal_machine_name, subscription_id, 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_data_extracts_restrictedexecresource_group_name, bare_metal_machine_name, subscription_id, commands, limitTimeSecondsRun one or more restricted 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_commandsexecresource_group_name, bare_metal_machine_name, subscription_id, 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.
startexecresource_group_name, bare_metal_machine_name, subscription_idStart the provided bare metal machine.
uncordonexecresource_group_name, bare_metal_machine_name, subscription_idUncordon 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
bare_metal_machine_namestringThe name of the bare metal machine. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$skipTokenstringThe opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. Default value is None.
$topintegerThe maximum number of resources to return from the operation. Example: '$top=10'. Default value is None.

SELECT examples

Get properties of the provided bare metal machine.

SELECT
id,
name,
actionStates,
associatedResourceIds,
bmcConnectionString,
bmcCredentials,
bmcIpv4Address,
bmcIpv6Address,
bmcMacAddress,
bootMacAddress,
caCertificate,
clusterId,
cordonStatus,
detailedStatus,
detailedStatusMessage,
etag,
extendedLocation,
hardwareInventory,
hardwareValidationStatus,
hybridAksClustersAssociatedIds,
kubernetesNodeName,
kubernetesVersion,
location,
machineClusterVersion,
machineDetails,
machineName,
machineRoles,
machineSkuId,
monitoringConfigurationStatus,
oamIpv4Address,
oamIpv6Address,
osImage,
powerState,
provisioningState,
rackId,
rackSlot,
readyState,
runtimeProtectionStatus,
secretRotationStatus,
serialNumber,
serviceTag,
systemData,
tags,
type,
virtualMachinesAssociatedIds
FROM azure_extras.network_cloud.bare_metal_machines
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND bare_metal_machine_name = '{{ bare_metal_machine_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- 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_extras.network_cloud.bare_metal_machines (
tags,
location,
properties,
extendedLocation,
resource_group_name,
bare_metal_machine_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ extendedLocation }}' /* required */,
'{{ resource_group_name }}',
'{{ bare_metal_machine_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
systemData,
tags,
type
;

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_extras.network_cloud.bare_metal_machines
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND bare_metal_machine_name = '{{ bare_metal_machine_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
systemData,
tags,
type;

REPLACE 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.

REPLACE azure_extras.network_cloud.bare_metal_machines
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND bare_metal_machine_name = '{{ bare_metal_machine_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND properties = '{{ properties }}' --required
AND extendedLocation = '{{ extendedLocation }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
systemData,
tags,
type;

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_extras.network_cloud.bare_metal_machines
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND bare_metal_machine_name = '{{ bare_metal_machine_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Cordon the provided bare metal machine's Kubernetes node.

EXEC azure_extras.network_cloud.bare_metal_machines.cordon 
@resource_group_name='{{ resource_group_name }}' --required,
@bare_metal_machine_name='{{ bare_metal_machine_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"evacuate": "{{ evacuate }}"
}'
;