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

package com.azure.resourcemanager.security.generated;

/** Samples for GovernanceRules List. */
public final class GovernanceRulesListSamples {
    /*
     * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListBySubscriptionGovernanceRules_example.json
     */
    /**
     * Sample code: List governance rules by subscription scope.
     *
     * @param manager Entry point to SecurityManager.
     */
    public static void listGovernanceRulesBySubscriptionScope(
        com.azure.resourcemanager.security.SecurityManager manager) {
        manager
            .governanceRules()
            .list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", com.azure.core.util.Context.NONE);
    }

    /*
     * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListBySecurityConnectorGovernanceRules_example.json
     */
    /**
     * Sample code: List governance rules by security connector scope.
     *
     * @param manager Entry point to SecurityManager.
     */
    public static void listGovernanceRulesBySecurityConnectorScope(
        com.azure.resourcemanager.security.SecurityManager manager) {
        manager
            .governanceRules()
            .list(
                "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector",
                com.azure.core.util.Context.NONE);
    }

    /*
     * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListByManagementGroupGovernanceRules_example.json
     */
    /**
     * Sample code: List governance rules by management group scope.
     *
     * @param manager Entry point to SecurityManager.
     */
    public static void listGovernanceRulesByManagementGroupScope(
        com.azure.resourcemanager.security.SecurityManager manager) {
        manager
            .governanceRules()
            .list("providers/Microsoft.Management/managementGroups/contoso", com.azure.core.util.Context.NONE);
    }
}
