"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.DatabaseThreatDetectionPolicy = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Contains information about a database Threat Detection policy.
 *
 * Uses Azure REST API version 2014-04-01. In version 2.x of the Azure Native provider, it used API version 2014-04-01.
 */
class DatabaseThreatDetectionPolicy extends pulumi.CustomResource {
    /**
     * Get an existing DatabaseThreatDetectionPolicy 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 DatabaseThreatDetectionPolicy(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of DatabaseThreatDetectionPolicy.  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'] === DatabaseThreatDetectionPolicy.__pulumiType;
    }
    /**
     * Create a DatabaseThreatDetectionPolicy 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) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.databaseName === undefined && !opts.urn) {
                throw new Error("Missing required property 'databaseName'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.serverName === undefined && !opts.urn) {
                throw new Error("Missing required property 'serverName'");
            }
            if (args?.state === undefined && !opts.urn) {
                throw new Error("Missing required property 'state'");
            }
            resourceInputs["databaseName"] = args?.databaseName;
            resourceInputs["disabledAlerts"] = args?.disabledAlerts;
            resourceInputs["emailAccountAdmins"] = args?.emailAccountAdmins;
            resourceInputs["emailAddresses"] = args?.emailAddresses;
            resourceInputs["location"] = args?.location;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["retentionDays"] = args?.retentionDays;
            resourceInputs["securityAlertPolicyName"] = args?.securityAlertPolicyName;
            resourceInputs["serverName"] = args?.serverName;
            resourceInputs["state"] = args?.state;
            resourceInputs["storageAccountAccessKey"] = args?.storageAccountAccessKey;
            resourceInputs["storageEndpoint"] = args?.storageEndpoint;
            resourceInputs["useServerDefault"] = args?.useServerDefault;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["disabledAlerts"] = undefined /*out*/;
            resourceInputs["emailAccountAdmins"] = undefined /*out*/;
            resourceInputs["emailAddresses"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["location"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["retentionDays"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["storageEndpoint"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["useServerDefault"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:sql/v20140401:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20180601preview:DatabaseSecurityAlertPolicy" }, { type: "azure-native:sql/v20180601preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20200202preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20200801preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20201101preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20210201preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20210501preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20210801preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20211101:DatabaseSecurityAlertPolicy" }, { type: "azure-native:sql/v20211101:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20211101preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20220201preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20220501preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20220801preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20221101preview:DatabaseSecurityAlertPolicy" }, { type: "azure-native:sql/v20221101preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20230201preview:DatabaseSecurityAlertPolicy" }, { type: "azure-native:sql/v20230201preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20230501preview:DatabaseSecurityAlertPolicy" }, { type: "azure-native:sql/v20230501preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20230801:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20230801preview:DatabaseSecurityAlertPolicy" }, { type: "azure-native:sql/v20230801preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20240501preview:DatabaseSecurityAlertPolicy" }, { type: "azure-native:sql/v20240501preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql/v20241101preview:DatabaseThreatDetectionPolicy" }, { type: "azure-native:sql:DatabaseSecurityAlertPolicy" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(DatabaseThreatDetectionPolicy.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DatabaseThreatDetectionPolicy = DatabaseThreatDetectionPolicy;
/** @internal */
DatabaseThreatDetectionPolicy.__pulumiType = 'azure-native:sql:DatabaseThreatDetectionPolicy';
//# sourceMappingURL=data:application/json;base64, 