Interface AlertRules
public interface AlertRules
Resource collection API of AlertRules.
-
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdate
(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) Creates or updates the alert rule.com.azure.core.http.rest.Response<AlertRule>
createOrUpdateWithResponse
(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, com.azure.core.util.Context context) Creates or updates the alert rule.void
Delete the alert rule.com.azure.core.http.rest.Response<Void>
deleteWithResponse
(String resourceGroupName, String workspaceName, String ruleId, com.azure.core.util.Context context) Delete the alert rule.Gets the alert rule.com.azure.core.http.rest.Response<AlertRule>
getWithResponse
(String resourceGroupName, String workspaceName, String ruleId, com.azure.core.util.Context context) Gets the alert rule.com.azure.core.http.rest.PagedIterable<AlertRule>
Gets all alert rules.com.azure.core.http.rest.PagedIterable<AlertRule>
Gets all alert rules.
-
Method Details
-
list
com.azure.core.http.rest.PagedIterable<AlertRule> list(String resourceGroupName, String workspaceName) Gets all alert rules.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.workspaceName
- The name of the workspace.- Returns:
- all alert rules as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<AlertRule> list(String resourceGroupName, String workspaceName, com.azure.core.util.Context context) Gets all alert rules.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.workspaceName
- The name of the workspace.context
- The context to associate with this operation.- Returns:
- all alert rules as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
get
Gets the alert rule.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.workspaceName
- The name of the workspace.ruleId
- Alert rule ID.- Returns:
- the alert rule.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getWithResponse
com.azure.core.http.rest.Response<AlertRule> getWithResponse(String resourceGroupName, String workspaceName, String ruleId, com.azure.core.util.Context context) Gets the alert rule.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.workspaceName
- The name of the workspace.ruleId
- Alert rule ID.context
- The context to associate with this operation.- Returns:
- the alert rule along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdate
AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) Creates or updates the alert rule.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.workspaceName
- The name of the workspace.ruleId
- Alert rule ID.alertRule
- The alert rule.- Returns:
- alert rule.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdateWithResponse
com.azure.core.http.rest.Response<AlertRule> createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, com.azure.core.util.Context context) Creates or updates the alert rule.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.workspaceName
- The name of the workspace.ruleId
- Alert rule ID.alertRule
- The alert rule.context
- The context to associate with this operation.- Returns:
- alert rule along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
Delete the alert rule.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.workspaceName
- The name of the workspace.ruleId
- Alert rule ID.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteWithResponse
com.azure.core.http.rest.Response<Void> deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, com.azure.core.util.Context context) Delete the alert rule.- Parameters:
resourceGroupName
- The name of the resource group. The name is case insensitive.workspaceName
- The name of the workspace.ruleId
- Alert rule ID.context
- The context to associate with this operation.- Returns:
- the
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-