"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SoftwareUpdateConfiguration = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages an Automation Software Update Configuration.
 *
 * !> **Note:** The `azure.automation.SoftwareUpdateConfiguration` resource has been deprecated because the Azure Automation Update Management was retired on 2024-08-31 and has been shutdown on 2025-02-28. This resource will be removed in v5.0 of the AzureRM Provider. Please migrate to Azure Update Manager, and use the `azure.maintenance.Configuration` resource combined with the appropriate assignment resources instead. See https://techcommunity.microsoft.com/blog/azuregovernanceandmanagementblog/log-analytics-agent-based-azure-management-services-shut-down-starting-28-februa/4381853 for more information.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "East US",
 * });
 * const exampleAccount = new azure.automation.Account("example", {
 *     name: "example",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "Basic",
 * });
 * const exampleRunBook = new azure.automation.RunBook("example", {
 *     name: "Get-AzureVMTutorial",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     automationAccountName: exampleAccount.name,
 *     logVerbose: true,
 *     logProgress: true,
 *     description: "This is a example runbook for terraform acceptance example",
 *     runbookType: "Python3",
 *     content: `# Some example content
 * # for Terraform acceptance example
 * `,
 *     tags: {
 *         ENV: "runbook_test",
 *     },
 * });
 * const exampleSoftwareUpdateConfiguration = new azure.automation.SoftwareUpdateConfiguration("example", {
 *     name: "example",
 *     automationAccountId: exampleAccount.id,
 *     linux: {
 *         classificationsIncludeds: "Security",
 *         excludedPackages: ["apt"],
 *         includedPackages: ["vim"],
 *         reboot: "IfRequired",
 *     },
 *     preTask: {
 *         source: exampleRunBook.name,
 *         parameters: {
 *             COMPUTER_NAME: "Foo",
 *         },
 *     },
 *     duration: "PT2H2M2S",
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Automation` - 2019-06-01
 *
 * ## Import
 *
 * Automations Software Update Configuration can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:automation/softwareUpdateConfiguration:SoftwareUpdateConfiguration example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/softwareUpdateConfigurations/suc1
 * ```
 */
class SoftwareUpdateConfiguration extends pulumi.CustomResource {
    /**
     * Get an existing SoftwareUpdateConfiguration 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 state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new SoftwareUpdateConfiguration(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:automation/softwareUpdateConfiguration:SoftwareUpdateConfiguration';
    /**
     * Returns true if the given object is an instance of SoftwareUpdateConfiguration.  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'] === SoftwareUpdateConfiguration.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["automationAccountId"] = state?.automationAccountId;
            resourceInputs["duration"] = state?.duration;
            resourceInputs["errorCode"] = state?.errorCode;
            resourceInputs["errorMessage"] = state?.errorMessage;
            resourceInputs["linux"] = state?.linux;
            resourceInputs["name"] = state?.name;
            resourceInputs["nonAzureComputerNames"] = state?.nonAzureComputerNames;
            resourceInputs["postTask"] = state?.postTask;
            resourceInputs["preTask"] = state?.preTask;
            resourceInputs["schedule"] = state?.schedule;
            resourceInputs["target"] = state?.target;
            resourceInputs["virtualMachineIds"] = state?.virtualMachineIds;
            resourceInputs["windows"] = state?.windows;
        }
        else {
            const args = argsOrState;
            if (args?.automationAccountId === undefined && !opts.urn) {
                throw new Error("Missing required property 'automationAccountId'");
            }
            if (args?.schedule === undefined && !opts.urn) {
                throw new Error("Missing required property 'schedule'");
            }
            resourceInputs["automationAccountId"] = args?.automationAccountId;
            resourceInputs["duration"] = args?.duration;
            resourceInputs["linux"] = args?.linux;
            resourceInputs["name"] = args?.name;
            resourceInputs["nonAzureComputerNames"] = args?.nonAzureComputerNames;
            resourceInputs["postTask"] = args?.postTask;
            resourceInputs["preTask"] = args?.preTask;
            resourceInputs["schedule"] = args?.schedule;
            resourceInputs["target"] = args?.target;
            resourceInputs["virtualMachineIds"] = args?.virtualMachineIds;
            resourceInputs["windows"] = args?.windows;
            resourceInputs["errorCode"] = undefined /*out*/;
            resourceInputs["errorMessage"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(SoftwareUpdateConfiguration.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SoftwareUpdateConfiguration = SoftwareUpdateConfiguration;
//# sourceMappingURL=softwareUpdateConfiguration.js.map