signal_definitions
Creates, updates, deletes, gets or lists a signal_definitions resource.
Overview
| Name | signal_definitions |
| Type | Resource |
| Id | azure.cloud_health.signal_definitions |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_health_model
| 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. |
dataUnit | string | Unit of the signal result (e.g. Bytes, MilliSeconds, Percent, Count)). |
displayName | string | Display name. |
evaluationRules | object | Evaluation rules for the signal definition. Required. |
provisioningState | string | The status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Creating", and "Deleting". (Succeeded, Failed, Canceled, Creating, Deleting) |
refreshInterval | string | Interval in which the signal is being evaluated. Defaults to PT1M (1 minute). Known values are: "PT1M", "PT5M", "PT10M", "PT30M", "PT1H", and "PT2H". (PT1M, PT5M, PT10M, PT30M, PT1H, PT2H) |
signalKind | string | Kind of the signal definition. Required. Known values are: "AzureResourceMetric", "LogAnalyticsQuery", "PrometheusMetricsQuery", and "External". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Optional set of tags (key-value pairs). |
type | string | 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. |
dataUnit | string | Unit of the signal result (e.g. Bytes, MilliSeconds, Percent, Count)). |
displayName | string | Display name. |
evaluationRules | object | Evaluation rules for the signal definition. Required. |
provisioningState | string | The status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Creating", and "Deleting". (Succeeded, Failed, Canceled, Creating, Deleting) |
refreshInterval | string | Interval in which the signal is being evaluated. Defaults to PT1M (1 minute). Known values are: "PT1M", "PT5M", "PT10M", "PT30M", "PT1H", and "PT2H". (PT1M, PT5M, PT10M, PT30M, PT1H, PT2H) |
signalKind | string | Kind of the signal definition. Required. Known values are: "AzureResourceMetric", "LogAnalyticsQuery", "PrometheusMetricsQuery", and "External". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Optional set of tags (key-value pairs). |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, health_model_name, signal_definition_name, subscription_id | Get a SignalDefinition. | |
list_by_health_model | select | resource_group_name, health_model_name, subscription_id | timestamp | List SignalDefinition resources by HealthModel. |
create_or_update | insert | resource_group_name, health_model_name, signal_definition_name, subscription_id | Create a SignalDefinition. | |
create_or_update | replace | resource_group_name, health_model_name, signal_definition_name, subscription_id | Create a SignalDefinition. | |
delete | delete | resource_group_name, health_model_name, signal_definition_name, subscription_id | Delete a SignalDefinition. |
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.
| Name | Datatype | Description |
|---|---|---|
health_model_name | string | Name of health model resource. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
signal_definition_name | string | Name of the signal definition. Must be unique within a health model. Required. |
subscription_id | string | |
timestamp | string (date-time) | Timestamp to use for the operation. When specified, the version of the resource at this point in time is retrieved. If not specified, the latest version is used. Default value is None. |
SELECT examples
- get
- list_by_health_model
Get a SignalDefinition.
SELECT
id,
name,
dataUnit,
displayName,
evaluationRules,
provisioningState,
refreshInterval,
signalKind,
systemData,
tags,
type
FROM azure.cloud_health.signal_definitions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND health_model_name = '{{ health_model_name }}' -- required
AND signal_definition_name = '{{ signal_definition_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List SignalDefinition resources by HealthModel.
SELECT
id,
name,
dataUnit,
displayName,
evaluationRules,
provisioningState,
refreshInterval,
signalKind,
systemData,
tags,
type
FROM azure.cloud_health.signal_definitions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND health_model_name = '{{ health_model_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND timestamp = '{{ timestamp }}'
;
INSERT examples
- create_or_update
- Manifest
Create a SignalDefinition.
INSERT INTO azure.cloud_health.signal_definitions (
properties,
resource_group_name,
health_model_name,
signal_definition_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ health_model_name }}',
'{{ signal_definition_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: signal_definitions
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the signal_definitions resource.
- name: health_model_name
value: "{{ health_model_name }}"
description: Required parameter for the signal_definitions resource.
- name: signal_definition_name
value: "{{ signal_definition_name }}"
description: Required parameter for the signal_definitions resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the signal_definitions resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
provisioningState: "{{ provisioningState }}"
displayName: "{{ displayName }}"
signalKind: "{{ signalKind }}"
refreshInterval: "{{ refreshInterval }}"
tags: "{{ tags }}"
dataUnit: "{{ dataUnit }}"
evaluationRules:
degradedRule:
operator: "{{ operator }}"
threshold: {{ threshold }}
unhealthyRule:
operator: "{{ operator }}"
threshold: {{ threshold }}
REPLACE examples
- create_or_update
Create a SignalDefinition.
REPLACE azure.cloud_health.signal_definitions
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND health_model_name = '{{ health_model_name }}' --required
AND signal_definition_name = '{{ signal_definition_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete a SignalDefinition.
DELETE FROM azure.cloud_health.signal_definitions
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND health_model_name = '{{ health_model_name }}' --required
AND signal_definition_name = '{{ signal_definition_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;