"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.PatchBaseline = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Resource Type definition for AWS::SSM::PatchBaseline
 *
 * ## Example Usage
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const myPatchBaseline = new aws_native.ssm.PatchBaseline("myPatchBaseline", {
 *     name: "myPatchBaseline",
 *     description: "Baseline containing all updates approved for Windows instances",
 *     operatingSystem: aws_native.ssm.PatchBaselineOperatingSystem.Windows,
 *     patchGroups: ["myPatchGroup"],
 *     approvalRules: {
 *         patchRules: [
 *             {
 *                 patchFilterGroup: {
 *                     patchFilters: [
 *                         {
 *                             values: [
 *                                 "Critical",
 *                                 "Important",
 *                                 "Moderate",
 *                             ],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.MsrcSeverity,
 *                         },
 *                         {
 *                             values: [
 *                                 "SecurityUpdates",
 *                                 "CriticalUpdates",
 *                             ],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.Classification,
 *                         },
 *                         {
 *                             values: ["WindowsServer2019"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.Product,
 *                         },
 *                     ],
 *                 },
 *                 approveAfterDays: 7,
 *                 complianceLevel: aws_native.ssm.PatchBaselineRuleComplianceLevel.Critical,
 *             },
 *             {
 *                 patchFilterGroup: {
 *                     patchFilters: [
 *                         {
 *                             values: [
 *                                 "Critical",
 *                                 "Important",
 *                                 "Moderate",
 *                             ],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.MsrcSeverity,
 *                         },
 *                         {
 *                             values: ["*"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.Classification,
 *                         },
 *                         {
 *                             values: ["APPLICATION"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.PatchSet,
 *                         },
 *                         {
 *                             values: ["Active Directory Rights Management Services Client 2.0"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.Product,
 *                         },
 *                         {
 *                             values: ["Active Directory"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.ProductFamily,
 *                         },
 *                     ],
 *                 },
 *                 approveAfterDays: 7,
 *                 complianceLevel: aws_native.ssm.PatchBaselineRuleComplianceLevel.Critical,
 *             },
 *         ],
 *     },
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const myPatchBaseline = new aws_native.ssm.PatchBaseline("myPatchBaseline", {
 *     name: "myPatchBaseline",
 *     description: "Baseline containing all updates approved for Windows instances",
 *     operatingSystem: aws_native.ssm.PatchBaselineOperatingSystem.Windows,
 *     patchGroups: ["myPatchGroup"],
 *     approvalRules: {
 *         patchRules: [
 *             {
 *                 patchFilterGroup: {
 *                     patchFilters: [
 *                         {
 *                             values: [
 *                                 "Critical",
 *                                 "Important",
 *                                 "Moderate",
 *                             ],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.MsrcSeverity,
 *                         },
 *                         {
 *                             values: [
 *                                 "SecurityUpdates",
 *                                 "CriticalUpdates",
 *                             ],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.Classification,
 *                         },
 *                         {
 *                             values: ["WindowsServer2019"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.Product,
 *                         },
 *                     ],
 *                 },
 *                 approveAfterDays: 7,
 *                 complianceLevel: aws_native.ssm.PatchBaselineRuleComplianceLevel.Critical,
 *             },
 *             {
 *                 patchFilterGroup: {
 *                     patchFilters: [
 *                         {
 *                             values: [
 *                                 "Critical",
 *                                 "Important",
 *                                 "Moderate",
 *                             ],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.MsrcSeverity,
 *                         },
 *                         {
 *                             values: ["*"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.Classification,
 *                         },
 *                         {
 *                             values: ["APPLICATION"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.PatchSet,
 *                         },
 *                         {
 *                             values: ["Active Directory Rights Management Services Client 2.0"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.Product,
 *                         },
 *                         {
 *                             values: ["Active Directory"],
 *                             key: aws_native.ssm.PatchBaselinePatchFilterKey.ProductFamily,
 *                         },
 *                     ],
 *                 },
 *                 approveAfterDays: 7,
 *                 complianceLevel: aws_native.ssm.PatchBaselineRuleComplianceLevel.Critical,
 *             },
 *         ],
 *     },
 * });
 *
 * ```
 */
class PatchBaseline extends pulumi.CustomResource {
    /**
     * Get an existing PatchBaseline 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 PatchBaseline(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of PatchBaseline.  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'] === PatchBaseline.__pulumiType;
    }
    /**
     * Create a PatchBaseline 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) {
            resourceInputs["approvalRules"] = args?.approvalRules;
            resourceInputs["approvedPatches"] = args?.approvedPatches;
            resourceInputs["approvedPatchesComplianceLevel"] = args?.approvedPatchesComplianceLevel;
            resourceInputs["approvedPatchesEnableNonSecurity"] = args?.approvedPatchesEnableNonSecurity;
            resourceInputs["availableSecurityUpdatesComplianceStatus"] = args?.availableSecurityUpdatesComplianceStatus;
            resourceInputs["defaultBaseline"] = args?.defaultBaseline;
            resourceInputs["description"] = args?.description;
            resourceInputs["globalFilters"] = args?.globalFilters;
            resourceInputs["name"] = args?.name;
            resourceInputs["operatingSystem"] = args?.operatingSystem;
            resourceInputs["patchGroups"] = args?.patchGroups;
            resourceInputs["rejectedPatches"] = args?.rejectedPatches;
            resourceInputs["rejectedPatchesAction"] = args?.rejectedPatchesAction;
            resourceInputs["sources"] = args?.sources;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["awsId"] = undefined /*out*/;
        }
        else {
            resourceInputs["approvalRules"] = undefined /*out*/;
            resourceInputs["approvedPatches"] = undefined /*out*/;
            resourceInputs["approvedPatchesComplianceLevel"] = undefined /*out*/;
            resourceInputs["approvedPatchesEnableNonSecurity"] = undefined /*out*/;
            resourceInputs["availableSecurityUpdatesComplianceStatus"] = undefined /*out*/;
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["defaultBaseline"] = undefined /*out*/;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["globalFilters"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["operatingSystem"] = undefined /*out*/;
            resourceInputs["patchGroups"] = undefined /*out*/;
            resourceInputs["rejectedPatches"] = undefined /*out*/;
            resourceInputs["rejectedPatchesAction"] = undefined /*out*/;
            resourceInputs["sources"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["operatingSystem"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(PatchBaseline.__pulumiType, name, resourceInputs, opts);
    }
}
exports.PatchBaseline = PatchBaseline;
/** @internal */
PatchBaseline.__pulumiType = 'aws-native:ssm:PatchBaseline';
//# sourceMappingURL=patchBaseline.js.map