monitored_resources
Creates, updates, deletes, gets or lists a monitored_resources
resource.
Overview
Name | monitored_resources |
Type | Resource |
Id | azure.scom.monitored_resources |
Fields
- vw_monitored_resources
- monitored_resources
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | text | The name of the resource |
agent_version | text | field from the properties object |
computer_name | text | field from the properties object |
connection_status | text | field from the properties object |
domain_name | text | field from the properties object |
health_status | text | field from the properties object |
install_type | text | field from the properties object |
instanceName | text | field from the properties object |
management_server_endpoint | text | field from the properties object |
monitoredResourceName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_id | text | field from the properties object |
resource_location | text | field from the properties object |
subscriptionId | text | field from the properties object |
type | text | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
properties | object | The properties of a monitored resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | instanceName, monitoredResourceName, resourceGroupName, subscriptionId | Retrieve the details of the monitored resource. |
create_or_update | INSERT | instanceName, monitoredResourceName, resourceGroupName, subscriptionId | Create or update a monitored resource. |
delete | DELETE | instanceName, monitoredResourceName, resourceGroupName, subscriptionId | Delete a monitored resource. |
SELECT
examples
Retrieve the details of the monitored resource.
- vw_monitored_resources
- monitored_resources
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 }}';
SELECT
id,
name,
properties,
type
FROM azure.scom.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.scom.monitored_resources (
instanceName,
monitoredResourceName,
resourceGroupName,
subscriptionId
)
SELECT
'{{ instanceName }}',
'{{ monitoredResourceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}'
;
- name: your_resource_model_name
props: []
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 }}';