ScheduledQueryRuleResourcePatch Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. ScheduledQueryRuleResourcePatch
- com.
Implements
public final class ScheduledQueryRuleResourcePatch
implements JsonSerializable<ScheduledQueryRuleResourcePatch>
The scheduled query rule resource for patch operations.
Constructor Summary
| Constructor | Description |
|---|---|
| ScheduledQueryRuleResourcePatch() |
Creates an instance of Scheduled |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Actions |
actions()
Get the actions property: Actions to invoke when the alert fires. |
| Boolean |
autoMitigate()
Get the auto |
| Boolean |
checkWorkspaceAlertsStorageConfigured()
Get the check |
| String |
createdWithApiVersion()
Get the created |
|
Scheduled |
criteria()
Get the criteria property: The rule criteria that defines the conditions of the scheduled query rule. |
| String |
description()
Get the description property: The description of the scheduled query rule. |
| String |
displayName()
Get the display |
| Boolean |
enabled()
Get the enabled property: The flag which indicates whether this scheduled query rule is enabled. |
| Duration |
evaluationFrequency()
Get the evaluation |
|
static
Scheduled |
fromJson(JsonReader jsonReader)
Reads an instance of Scheduled |
| Boolean |
isLegacyLogAnalyticsRule()
Get the is |
| Boolean |
isWorkspaceAlertsStorageConfigured()
Get the is |
| Duration |
muteActionsDuration()
Get the mute |
| Duration |
overrideQueryTimeRange()
Get the override |
| List<String> |
scopes()
Get the scopes property: The list of resource id's that this scheduled query rule is scoped to. |
|
Alert |
severity()
Get the severity property: Severity of the alert. |
| Boolean |
skipQueryValidation()
Get the skip |
| Map<String,String> |
tags()
Get the tags property: Resource tags. |
| List<String> |
targetResourceTypes()
Get the target |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
| Duration |
windowSize()
Get the window |
|
Scheduled |
withActions(Actions actions)
Set the actions property: Actions to invoke when the alert fires. |
|
Scheduled |
withAutoMitigate(Boolean autoMitigate)
Set the auto |
|
Scheduled |
withCheckWorkspaceAlertsStorageConfigured(Boolean checkWorkspaceAlertsStorageConfigured)
Set the check |
|
Scheduled |
withCriteria(ScheduledQueryRuleCriteria criteria)
Set the criteria property: The rule criteria that defines the conditions of the scheduled query rule. |
|
Scheduled |
withDescription(String description)
Set the description property: The description of the scheduled query rule. |
|
Scheduled |
withDisplayName(String displayName)
Set the display |
|
Scheduled |
withEnabled(Boolean enabled)
Set the enabled property: The flag which indicates whether this scheduled query rule is enabled. |
|
Scheduled |
withEvaluationFrequency(Duration evaluationFrequency)
Set the evaluation |
|
Scheduled |
withMuteActionsDuration(Duration muteActionsDuration)
Set the mute |
|
Scheduled |
withOverrideQueryTimeRange(Duration overrideQueryTimeRange)
Set the override |
|
Scheduled |
withScopes(List<String> scopes)
Set the scopes property: The list of resource id's that this scheduled query rule is scoped to. |
|
Scheduled |
withSeverity(AlertSeverity severity)
Set the severity property: Severity of the alert. |
|
Scheduled |
withSkipQueryValidation(Boolean skipQueryValidation)
Set the skip |
|
Scheduled |
withTags(Map<String,String> tags)
Set the tags property: Resource tags. |
|
Scheduled |
withTargetResourceTypes(List<String> targetResourceTypes)
Set the target |
|
Scheduled |
withWindowSize(Duration windowSize)
Set the window |
Methods inherited from java.lang.Object
Constructor Details
ScheduledQueryRuleResourcePatch
public ScheduledQueryRuleResourcePatch()
Creates an instance of ScheduledQueryRuleResourcePatch class.
Method Details
actions
public Actions actions()
Get the actions property: Actions to invoke when the alert fires.
Returns:
autoMitigate
public Boolean autoMitigate()
Get the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of the kind LogAlert.
Returns:
checkWorkspaceAlertsStorageConfigured
public Boolean checkWorkspaceAlertsStorageConfigured()
Get the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind LogAlert.
Returns:
createdWithApiVersion
public String createdWithApiVersion()
Get the createdWithApiVersion property: The api-version used when creating this alert rule.
Returns:
criteria
public ScheduledQueryRuleCriteria criteria()
Get the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
Returns:
description
public String description()
Get the description property: The description of the scheduled query rule.
Returns:
displayName
public String displayName()
Get the displayName property: The display name of the alert rule.
Returns:
enabled
public Boolean enabled()
Get the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false.
Returns:
evaluationFrequency
public Duration evaluationFrequency()
Get the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
Returns:
fromJson
public static ScheduledQueryRuleResourcePatch fromJson(JsonReader jsonReader)
Reads an instance of ScheduledQueryRuleResourcePatch from the JsonReader.
Parameters:
Returns:
Throws:
isLegacyLogAnalyticsRule
public Boolean isLegacyLogAnalyticsRule()
Get the isLegacyLogAnalyticsRule property: True if alert rule is legacy Log Analytic rule.
Returns:
isWorkspaceAlertsStorageConfigured
public Boolean isWorkspaceAlertsStorageConfigured()
Get the isWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.
Returns:
muteActionsDuration
public Duration muteActionsDuration()
Get the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert.
Returns:
overrideQueryTimeRange
public Duration overrideQueryTimeRange()
Get the overrideQueryTimeRange property: If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
Returns:
scopes
public List<String> scopes()
Get the scopes property: The list of resource id's that this scheduled query rule is scoped to.
Returns:
severity
public AlertSeverity severity()
Get the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert.
Returns:
skipQueryValidation
public Boolean skipQueryValidation()
Get the skipQueryValidation property: The flag which indicates whether the provided query should be validated or not. The default is false. Relevant only for rules of the kind LogAlert.
Returns:
tags
public Map<String,String> tags()
Get the tags property: Resource tags.
Returns:
targetResourceTypes
public List<String> targetResourceTypes()
Get the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
Returns:
toJson
validate
public void validate()
Validates the instance.
windowSize
public Duration windowSize()
Get the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert.
Returns:
withActions
public ScheduledQueryRuleResourcePatch withActions(Actions actions)
Set the actions property: Actions to invoke when the alert fires.
Parameters:
Returns:
withAutoMitigate
public ScheduledQueryRuleResourcePatch withAutoMitigate(Boolean autoMitigate)
Set the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of the kind LogAlert.
Parameters:
Returns:
withCheckWorkspaceAlertsStorageConfigured
public ScheduledQueryRuleResourcePatch withCheckWorkspaceAlertsStorageConfigured(Boolean checkWorkspaceAlertsStorageConfigured)
Set the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind LogAlert.
Parameters:
Returns:
withCriteria
public ScheduledQueryRuleResourcePatch withCriteria(ScheduledQueryRuleCriteria criteria)
Set the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
Parameters:
Returns:
withDescription
public ScheduledQueryRuleResourcePatch withDescription(String description)
Set the description property: The description of the scheduled query rule.
Parameters:
Returns:
withDisplayName
public ScheduledQueryRuleResourcePatch withDisplayName(String displayName)
Set the displayName property: The display name of the alert rule.
Parameters:
Returns:
withEnabled
public ScheduledQueryRuleResourcePatch withEnabled(Boolean enabled)
Set the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false.
Parameters:
Returns:
withEvaluationFrequency
public ScheduledQueryRuleResourcePatch withEvaluationFrequency(Duration evaluationFrequency)
Set the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
Parameters:
Returns:
withMuteActionsDuration
public ScheduledQueryRuleResourcePatch withMuteActionsDuration(Duration muteActionsDuration)
Set the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert.
Parameters:
Returns:
withOverrideQueryTimeRange
public ScheduledQueryRuleResourcePatch withOverrideQueryTimeRange(Duration overrideQueryTimeRange)
Set the overrideQueryTimeRange property: If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
Parameters:
Returns:
withScopes
public ScheduledQueryRuleResourcePatch withScopes(List<String> scopes)
Set the scopes property: The list of resource id's that this scheduled query rule is scoped to.
Parameters:
Returns:
withSeverity
public ScheduledQueryRuleResourcePatch withSeverity(AlertSeverity severity)
Set the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert.
Parameters:
Returns:
withSkipQueryValidation
public ScheduledQueryRuleResourcePatch withSkipQueryValidation(Boolean skipQueryValidation)
Set the skipQueryValidation property: The flag which indicates whether the provided query should be validated or not. The default is false. Relevant only for rules of the kind LogAlert.
Parameters:
Returns:
withTags
public ScheduledQueryRuleResourcePatch withTags(Map<String,String> tags)
Set the tags property: Resource tags.
Parameters:
Returns:
withTargetResourceTypes
public ScheduledQueryRuleResourcePatch withTargetResourceTypes(List<String> targetResourceTypes)
Set the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
Parameters:
Returns:
withWindowSize
public ScheduledQueryRuleResourcePatch withWindowSize(Duration windowSize)
Set the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert.
Parameters:
Returns: