"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.PolicyDefinitionVersionAtManagementGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The ID of the policy definition version.
 *
 * Uses Azure REST API version 2025-01-01. In version 2.x of the Azure Native provider, it used API version 2023-04-01.
 *
 * Other available API versions: 2023-04-01, 2024-05-01, 2025-03-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native authorization [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
 */
class PolicyDefinitionVersionAtManagementGroup extends pulumi.CustomResource {
    /**
     * Get an existing PolicyDefinitionVersionAtManagementGroup resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new PolicyDefinitionVersionAtManagementGroup(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of PolicyDefinitionVersionAtManagementGroup.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === PolicyDefinitionVersionAtManagementGroup.__pulumiType;
    }
    /**
     * Create a PolicyDefinitionVersionAtManagementGroup resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        var _a;
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if ((!args || args.managementGroupName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'managementGroupName'");
            }
            if ((!args || args.policyDefinitionName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'policyDefinitionName'");
            }
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["displayName"] = args ? args.displayName : undefined;
            resourceInputs["managementGroupName"] = args ? args.managementGroupName : undefined;
            resourceInputs["metadata"] = args ? args.metadata : undefined;
            resourceInputs["mode"] = (_a = (args ? args.mode : undefined)) !== null && _a !== void 0 ? _a : "Indexed";
            resourceInputs["parameters"] = args ? args.parameters : undefined;
            resourceInputs["policyDefinitionName"] = args ? args.policyDefinitionName : undefined;
            resourceInputs["policyDefinitionVersion"] = args ? args.policyDefinitionVersion : undefined;
            resourceInputs["policyRule"] = args ? args.policyRule : undefined;
            resourceInputs["policyType"] = args ? args.policyType : undefined;
            resourceInputs["version"] = args ? args.version : undefined;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["systemData"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["displayName"] = undefined /*out*/;
            resourceInputs["metadata"] = undefined /*out*/;
            resourceInputs["mode"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["parameters"] = undefined /*out*/;
            resourceInputs["policyRule"] = undefined /*out*/;
            resourceInputs["policyType"] = undefined /*out*/;
            resourceInputs["systemData"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["version"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:authorization/v20230401:PolicyDefinitionVersionAtManagementGroup" }, { type: "azure-native:authorization/v20240501:PolicyDefinitionVersionAtManagementGroup" }, { type: "azure-native:authorization/v20250101:PolicyDefinitionVersionAtManagementGroup" }, { type: "azure-native:authorization/v20250301:PolicyDefinitionVersionAtManagementGroup" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(PolicyDefinitionVersionAtManagementGroup.__pulumiType, name, resourceInputs, opts);
    }
}
exports.PolicyDefinitionVersionAtManagementGroup = PolicyDefinitionVersionAtManagementGroup;
/** @internal */
PolicyDefinitionVersionAtManagementGroup.__pulumiType = 'azure-native:authorization:PolicyDefinitionVersionAtManagementGroup';
//# sourceMappingURL=data:application/json;base64, 