Skip to main content

monitored_resources

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

Overview

Namemonitored_resources
TypeResource
Idazure.scom.monitored_resources

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
agent_versiontextfield from the properties object
computer_nametextfield from the properties object
connection_statustextfield from the properties object
domain_nametextfield from the properties object
health_statustextfield from the properties object
install_typetextfield from the properties object
instanceNametextfield from the properties object
management_server_endpointtextfield from the properties object
monitoredResourceNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resource_idtextfield from the properties object
resource_locationtextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTinstanceName, monitoredResourceName, resourceGroupName, subscriptionIdRetrieve the details of the monitored resource.
create_or_updateINSERTinstanceName, monitoredResourceName, resourceGroupName, subscriptionIdCreate or update a monitored resource.
deleteDELETEinstanceName, monitoredResourceName, resourceGroupName, subscriptionIdDelete a monitored resource.

SELECT examples

Retrieve the details of the monitored resource.

SELECT
id,
name,
agent_version,
computer_name,
connection_status,
domain_name,
health_status,
install_type,
instanceName,
management_server_endpoint,
monitoredResourceName,
provisioning_state,
resourceGroupName,
resource_id,
resource_location,
subscriptionId,
type
FROM azure.scom.vw_monitored_resources
WHERE instanceName = '{{ instanceName }}'
AND monitoredResourceName = '{{ monitoredResourceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.scom.monitored_resources (
instanceName,
monitoredResourceName,
resourceGroupName,
subscriptionId
)
SELECT
'{{ instanceName }}',
'{{ monitoredResourceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}'
;

DELETE example

Deletes the specified monitored_resources resource.

/*+ delete */
DELETE FROM azure.scom.monitored_resources
WHERE instanceName = '{{ instanceName }}'
AND monitoredResourceName = '{{ monitoredResourceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';