Class ActivityLogAlertResourceInner
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
com.azure.resourcemanager.monitor.fluent.models.ActivityLogAlertResourceInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
public final class ActivityLogAlertResourceInner
extends com.azure.core.management.Resource
An Activity Log Alert rule resource.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ActivityLogAlertResourceInner class. -
Method Summary
Modifier and TypeMethodDescriptionactions()
Get the actions property: The actions that will activate when the condition is met.Get the condition property: The condition that will cause this alert to activate.Get the description property: A description of this Activity Log Alert rule.enabled()
Get the enabled property: Indicates whether this Activity Log Alert rule is enabled.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ActivityLogAlertResourceInner from the JsonReader.id()
Get the id property: Fully qualified resource Id for the resource.name()
Get the name property: The name of the resource.scopes()
Get the scopes property: A list of resource IDs that will be used as prefixes.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) type()
Get the type property: The type of the resource.void
validate()
Validates the instance.withActions
(ActionList actions) Set the actions property: The actions that will activate when the condition is met.withCondition
(ActivityLogAlertAllOfCondition condition) Set the condition property: The condition that will cause this alert to activate.withDescription
(String description) Set the description property: A description of this Activity Log Alert rule.withEnabled
(Boolean enabled) Set the enabled property: Indicates whether this Activity Log Alert rule is enabled.withLocation
(String location) withScopes
(List<String> scopes) Set the scopes property: A list of resource IDs that will be used as prefixes.Methods inherited from class com.azure.core.management.Resource
location, tags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ActivityLogAlertResourceInner
public ActivityLogAlertResourceInner()Creates an instance of ActivityLogAlertResourceInner class.
-
-
Method Details
-
id
Get the id property: Fully qualified resource Id for the resource.- Overrides:
id
in classcom.azure.core.management.ProxyResource
- Returns:
- the id value.
-
name
Get the name property: The name of the resource.- Overrides:
name
in classcom.azure.core.management.ProxyResource
- Returns:
- the name value.
-
type
Get the type property: The type of the resource.- Overrides:
type
in classcom.azure.core.management.ProxyResource
- Returns:
- the type value.
-
withLocation
- Overrides:
withLocation
in classcom.azure.core.management.Resource
-
withTags
- Overrides:
withTags
in classcom.azure.core.management.Resource
-
scopes
Get the scopes property: A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.- Returns:
- the scopes value.
-
withScopes
Set the scopes property: A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.- Parameters:
scopes
- the scopes value to set.- Returns:
- the ActivityLogAlertResourceInner object itself.
-
condition
Get the condition property: The condition that will cause this alert to activate.- Returns:
- the condition value.
-
withCondition
Set the condition property: The condition that will cause this alert to activate.- Parameters:
condition
- the condition value to set.- Returns:
- the ActivityLogAlertResourceInner object itself.
-
actions
Get the actions property: The actions that will activate when the condition is met.- Returns:
- the actions value.
-
withActions
Set the actions property: The actions that will activate when the condition is met.- Parameters:
actions
- the actions value to set.- Returns:
- the ActivityLogAlertResourceInner object itself.
-
enabled
Get the enabled property: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.- Parameters:
enabled
- the enabled value to set.- Returns:
- the ActivityLogAlertResourceInner object itself.
-
description
Get the description property: A description of this Activity Log Alert rule.- Returns:
- the description value.
-
withDescription
Set the description property: A description of this Activity Log Alert rule.- Parameters:
description
- the description value to set.- Returns:
- the ActivityLogAlertResourceInner object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
- Overrides:
toJson
in classcom.azure.core.management.Resource
- Throws:
IOException
-
fromJson
public static ActivityLogAlertResourceInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ActivityLogAlertResourceInner from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ActivityLogAlertResourceInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the ActivityLogAlertResourceInner.
-