Skip to main content

hosts

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

Overview

Namehosts
TypeResource
Idazure_isv.connected_vsphere.hosts

Fields

NameDatatypeDescription
idtextGets or sets the Id.
nametextGets or sets the name.
cpu_mhztextfield from the properties object
custom_resource_nametextfield from the properties object
datastore_idstextfield from the properties object
extended_locationtextfield from the properties object
hostNametextfield from the properties object
inventory_item_idtextfield from the properties object
kindtextMetadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
locationtextGets or sets the location.
memory_size_gbtextfield from the properties object
mo_nametextfield from the properties object
mo_ref_idtextfield from the properties object
network_idstextfield from the properties object
overall_cpu_usage_m_hztextfield from the properties object
overall_memory_usage_gbtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
statusestextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextGets or sets the Resource tags.
typetextGets or sets the type of the resource.
uuidtextfield from the properties object
v_center_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECThostName, resourceGroupName, subscriptionIdImplements host GET method.
listSELECTsubscriptionIdList of hosts in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList of hosts in a resource group.
createINSERThostName, resourceGroupName, subscriptionId, data__location, data__propertiesCreate Or Update host.
deleteDELETEhostName, resourceGroupName, subscriptionIdImplements host DELETE method.
updateUPDATEhostName, resourceGroupName, subscriptionIdAPI to update certain properties of the host resource.

SELECT examples

List of hosts in a subscription.

SELECT
id,
name,
cpu_mhz,
custom_resource_name,
datastore_ids,
extended_location,
hostName,
inventory_item_id,
kind,
location,
memory_size_gb,
mo_name,
mo_ref_id,
network_ids,
overall_cpu_usage_m_hz,
overall_memory_usage_gb,
provisioning_state,
resourceGroupName,
statuses,
subscriptionId,
system_data,
tags,
type,
uuid,
v_center_id
FROM azure_isv.connected_vsphere.vw_hosts
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure_isv.connected_vsphere.hosts (
hostName,
resourceGroupName,
subscriptionId,
data__location,
data__properties,
properties,
location,
extendedLocation,
systemData,
tags,
kind
)
SELECT
'{{ hostName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ location }}',
'{{ extendedLocation }}',
'{{ systemData }}',
'{{ tags }}',
'{{ kind }}'
;

UPDATE example

Updates a hosts resource.

/*+ update */
UPDATE azure_isv.connected_vsphere.hosts
SET
tags = '{{ tags }}'
WHERE
hostName = '{{ hostName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified hosts resource.

/*+ delete */
DELETE FROM azure_isv.connected_vsphere.hosts
WHERE hostName = '{{ hostName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';