Skip to main content

machines

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

Overview

Namemachines
TypeResource
Idazure.hybrid_compute.machines

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
agent_versiontextfield from the properties object
client_public_keytextfield from the properties object
display_nametextfield from the properties object
error_detailstextfield from the properties object
identitytextfield from the properties object
last_status_changetextfield from the properties object
locationtextResource location
machine_fqdntextfield from the properties object
os_nametextfield from the properties object
os_profiletextfield from the properties object
os_versiontextfield from the properties object
physical_locationtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags
typetextResource type
vm_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTname, resourceGroupName, subscriptionIdRetrieves information about the model view or the instance view of a hybrid machine.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines.
list_by_subscriptionSELECTsubscriptionIdLists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines.
create_or_updateINSERTname, resourceGroupName, subscriptionIdThe operation to create or update a hybrid machine resource identity in Azure.
deleteDELETEname, resourceGroupName, subscriptionIdThe operation to remove a hybrid machine identity in Azure.
updateUPDATEname, resourceGroupName, subscriptionIdThe operation to update a hybrid machine.
reconnectEXECname, resourceGroupName, subscriptionIdThe operation to reconnect a hybrid machine resource to its identity in Azure.

SELECT examples

Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines.

SELECT
id,
name,
agent_version,
client_public_key,
display_name,
error_details,
identity,
last_status_change,
location,
machine_fqdn,
os_name,
os_profile,
os_version,
physical_location,
provisioning_state,
resourceGroupName,
status,
subscriptionId,
tags,
type,
vm_id
FROM azure.hybrid_compute.vw_machines
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new machines resource.

/*+ create */
INSERT INTO azure.hybrid_compute.machines (
name,
resourceGroupName,
subscriptionId,
properties,
location,
tags,
identity
)
SELECT
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}',
'{{ identity }}'
;

UPDATE example

Updates a machines resource.

/*+ update */
UPDATE azure.hybrid_compute.machines
SET
identity = '{{ identity }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified machines resource.

/*+ delete */
DELETE FROM azure.hybrid_compute.machines
WHERE name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';