Class LogSearchRuleResourceInner
- java.lang.Object
-
- com.azure.core.management.ProxyResource
-
- com.azure.core.management.Resource
-
- com.azure.resourcemanager.monitor.fluent.models.LogSearchRuleResourceInner
-
public class LogSearchRuleResourceInner extends com.azure.core.management.ResourceThe Log Search Rule resource.
-
-
Constructor Summary
Constructors Constructor Description LogSearchRuleResourceInner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Actionaction()Get the action property: Action needs to be taken on rule execution.BooleanautoMitigate()Get the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.StringcreatedWithApiVersion()Get the createdWithApiVersion property: The api-version used when creating this alert rule.Stringdescription()Get the description property: The description of the Log Search rule.StringdisplayName()Get the displayName property: The display name of the alert rule.Enabledenabled()Get the enabled property: The flag which indicates whether the Log Search rule is enabled.Stringetag()Get the etag property: The etag field is *not* required.BooleanisLegacyLogAnalyticsRule()Get the isLegacyLogAnalyticsRule property: True if alert rule is legacy Log Analytic rule.Stringkind()Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g.OffsetDateTimelastUpdatedTime()Get the lastUpdatedTime property: Last time the rule was updated in IS08601 format.ProvisioningStateprovisioningState()Get the provisioningState property: Provisioning state of the scheduled query rule.Scheduleschedule()Get the schedule property: Schedule (Frequency, Time Window) for rule.Sourcesource()Get the source property: Data Source against which rule will Query Data.voidvalidate()Validates the instance.LogSearchRuleResourceInnerwithAction(Action action)Set the action property: Action needs to be taken on rule execution.LogSearchRuleResourceInnerwithAutoMitigate(Boolean autoMitigate)Set the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.LogSearchRuleResourceInnerwithDescription(String description)Set the description property: The description of the Log Search rule.LogSearchRuleResourceInnerwithDisplayName(String displayName)Set the displayName property: The display name of the alert rule.LogSearchRuleResourceInnerwithEnabled(Enabled enabled)Set the enabled property: The flag which indicates whether the Log Search rule is enabled.LogSearchRuleResourceInnerwithLocation(String location)LogSearchRuleResourceInnerwithSchedule(Schedule schedule)Set the schedule property: Schedule (Frequency, Time Window) for rule.LogSearchRuleResourceInnerwithSource(Source source)Set the source property: Data Source against which rule will Query Data.LogSearchRuleResourceInnerwithTags(Map<String,String> tags)
-
-
-
Method Detail
-
createdWithApiVersion
public String createdWithApiVersion()
Get the createdWithApiVersion property: The api-version used when creating this alert rule.- Returns:
- the createdWithApiVersion value.
-
isLegacyLogAnalyticsRule
public Boolean isLegacyLogAnalyticsRule()
Get the isLegacyLogAnalyticsRule property: True if alert rule is legacy Log Analytic rule.- Returns:
- the isLegacyLogAnalyticsRule value.
-
description
public String description()
Get the description property: The description of the Log Search rule.- Returns:
- the description value.
-
withDescription
public LogSearchRuleResourceInner withDescription(String description)
Set the description property: The description of the Log Search rule.- Parameters:
description- the description value to set.- Returns:
- the LogSearchRuleResourceInner object itself.
-
displayName
public String displayName()
Get the displayName property: The display name of the alert rule.- Returns:
- the displayName value.
-
withDisplayName
public LogSearchRuleResourceInner withDisplayName(String displayName)
Set the displayName property: The display name of the alert rule.- Parameters:
displayName- the displayName value to set.- Returns:
- the LogSearchRuleResourceInner object itself.
-
autoMitigate
public Boolean autoMitigate()
Get the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not. The default is false.- Returns:
- the autoMitigate value.
-
withAutoMitigate
public LogSearchRuleResourceInner withAutoMitigate(Boolean autoMitigate)
Set the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not. The default is false.- Parameters:
autoMitigate- the autoMitigate value to set.- Returns:
- the LogSearchRuleResourceInner object itself.
-
enabled
public Enabled enabled()
Get the enabled property: The flag which indicates whether the Log Search rule is enabled. Value should be true or false.- Returns:
- the enabled value.
-
withEnabled
public LogSearchRuleResourceInner withEnabled(Enabled enabled)
Set the enabled property: The flag which indicates whether the Log Search rule is enabled. Value should be true or false.- Parameters:
enabled- the enabled value to set.- Returns:
- the LogSearchRuleResourceInner object itself.
-
lastUpdatedTime
public OffsetDateTime lastUpdatedTime()
Get the lastUpdatedTime property: Last time the rule was updated in IS08601 format.- Returns:
- the lastUpdatedTime value.
-
provisioningState
public ProvisioningState provisioningState()
Get the provisioningState property: Provisioning state of the scheduled query rule.- Returns:
- the provisioningState value.
-
source
public Source source()
Get the source property: Data Source against which rule will Query Data.- Returns:
- the source value.
-
withSource
public LogSearchRuleResourceInner withSource(Source source)
Set the source property: Data Source against which rule will Query Data.- Parameters:
source- the source value to set.- Returns:
- the LogSearchRuleResourceInner object itself.
-
schedule
public Schedule schedule()
Get the schedule property: Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction.- Returns:
- the schedule value.
-
withSchedule
public LogSearchRuleResourceInner withSchedule(Schedule schedule)
Set the schedule property: Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction.- Parameters:
schedule- the schedule value to set.- Returns:
- the LogSearchRuleResourceInner object itself.
-
action
public Action action()
Get the action property: Action needs to be taken on rule execution.- Returns:
- the action value.
-
withAction
public LogSearchRuleResourceInner withAction(Action action)
Set the action property: Action needs to be taken on rule execution.- Parameters:
action- the action value to set.- Returns:
- the LogSearchRuleResourceInner object itself.
-
kind
public String kind()
Get the kind property: Metadata 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.- Returns:
- the kind value.
-
etag
public String etag()
Get the etag property: The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.- Returns:
- the etag value.
-
withLocation
public LogSearchRuleResourceInner withLocation(String location)
- Overrides:
withLocationin classcom.azure.core.management.Resource
-
withTags
public LogSearchRuleResourceInner withTags(Map<String,String> tags)
- Overrides:
withTagsin classcom.azure.core.management.Resource
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-