// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.monitor.generated;

import com.azure.core.util.Context;

/** Samples for MetricAlerts GetByResourceGroup. */
public final class MetricAlertsGetByResourceGroupSamples {
    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertResourceGroup.json
     */
    /**
     * Sample code: Get an alert rule on resource group(s).
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getAnAlertRuleOnResourceGroupS(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetricAlerts()
            .getByResourceGroupWithResponse("gigtest1", "MetricAlertAtResourceGroupLevel", Context.NONE);
    }

    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertMultipleResource.json
     */
    /**
     * Sample code: Get a dynamic alert rule for multiple resources.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getADynamicAlertRuleForMultipleResources(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetricAlerts()
            .getByResourceGroupWithResponse("gigtest", "MetricAlertOnMultipleResources", Context.NONE);
    }

    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getWebTestMetricAlert.json
     */
    /**
     * Sample code: Get a web test alert rule.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getAWebTestAlertRule(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetricAlerts()
            .getByResourceGroupWithResponse("rg-example", "webtest-name-example", Context.NONE);
    }

    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertSingleResource.json
     */
    /**
     * Sample code: Get an alert rule for single resource.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getAnAlertRuleForSingleResource(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetricAlerts()
            .getByResourceGroupWithResponse("gigtest", "chiricutin", Context.NONE);
    }

    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertSubscription.json
     */
    /**
     * Sample code: Get an alert rule on subscription.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getAnAlertRuleOnSubscription(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetricAlerts()
            .getByResourceGroupWithResponse("gigtest", "MetricAlertAtSubscriptionLevel", Context.NONE);
    }

    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertSingleResource.json
     */
    /**
     * Sample code: Get a dynamic alert rule for single resource.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getADynamicAlertRuleForSingleResource(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetricAlerts()
            .getByResourceGroupWithResponse("gigtest", "chiricutin", Context.NONE);
    }

    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertMultipleResource.json
     */
    /**
     * Sample code: Get an alert rule for multiple resources.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getAnAlertRuleForMultipleResources(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetricAlerts()
            .getByResourceGroupWithResponse("gigtest", "MetricAlertOnMultipleResources", Context.NONE);
    }
}
