"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.LaunchConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The AWS::AutoScaling::LaunchConfiguration resource specifies the launch configuration that can be used by an Auto Scaling group to configure Amazon EC2 instances.
 */
class LaunchConfiguration extends pulumi.CustomResource {
    /**
     * Get an existing LaunchConfiguration 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 LaunchConfiguration(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of LaunchConfiguration.  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'] === LaunchConfiguration.__pulumiType;
    }
    /**
     * Create a LaunchConfiguration 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?.imageId === undefined && !opts.urn) {
                throw new Error("Missing required property 'imageId'");
            }
            if (args?.instanceType === undefined && !opts.urn) {
                throw new Error("Missing required property 'instanceType'");
            }
            resourceInputs["associatePublicIpAddress"] = args?.associatePublicIpAddress;
            resourceInputs["blockDeviceMappings"] = args?.blockDeviceMappings;
            resourceInputs["classicLinkVpcId"] = args?.classicLinkVpcId;
            resourceInputs["classicLinkVpcSecurityGroups"] = args?.classicLinkVpcSecurityGroups;
            resourceInputs["ebsOptimized"] = args?.ebsOptimized;
            resourceInputs["iamInstanceProfile"] = args?.iamInstanceProfile;
            resourceInputs["imageId"] = args?.imageId;
            resourceInputs["instanceId"] = args?.instanceId;
            resourceInputs["instanceMonitoring"] = args?.instanceMonitoring;
            resourceInputs["instanceType"] = args?.instanceType;
            resourceInputs["kernelId"] = args?.kernelId;
            resourceInputs["keyName"] = args?.keyName;
            resourceInputs["launchConfigurationName"] = args?.launchConfigurationName;
            resourceInputs["metadataOptions"] = args?.metadataOptions;
            resourceInputs["placementTenancy"] = args?.placementTenancy;
            resourceInputs["ramDiskId"] = args?.ramDiskId;
            resourceInputs["securityGroups"] = args?.securityGroups;
            resourceInputs["spotPrice"] = args?.spotPrice;
            resourceInputs["userData"] = args?.userData;
        }
        else {
            resourceInputs["associatePublicIpAddress"] = undefined /*out*/;
            resourceInputs["blockDeviceMappings"] = undefined /*out*/;
            resourceInputs["classicLinkVpcId"] = undefined /*out*/;
            resourceInputs["classicLinkVpcSecurityGroups"] = undefined /*out*/;
            resourceInputs["ebsOptimized"] = undefined /*out*/;
            resourceInputs["iamInstanceProfile"] = undefined /*out*/;
            resourceInputs["imageId"] = undefined /*out*/;
            resourceInputs["instanceId"] = undefined /*out*/;
            resourceInputs["instanceMonitoring"] = undefined /*out*/;
            resourceInputs["instanceType"] = undefined /*out*/;
            resourceInputs["kernelId"] = undefined /*out*/;
            resourceInputs["keyName"] = undefined /*out*/;
            resourceInputs["launchConfigurationName"] = undefined /*out*/;
            resourceInputs["metadataOptions"] = undefined /*out*/;
            resourceInputs["placementTenancy"] = undefined /*out*/;
            resourceInputs["ramDiskId"] = undefined /*out*/;
            resourceInputs["securityGroups"] = undefined /*out*/;
            resourceInputs["spotPrice"] = undefined /*out*/;
            resourceInputs["userData"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["associatePublicIpAddress", "blockDeviceMappings[*]", "classicLinkVpcId", "classicLinkVpcSecurityGroups[*]", "ebsOptimized", "iamInstanceProfile", "imageId", "instanceId", "instanceMonitoring", "instanceType", "kernelId", "keyName", "launchConfigurationName", "metadataOptions", "placementTenancy", "ramDiskId", "securityGroups[*]", "spotPrice", "userData"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(LaunchConfiguration.__pulumiType, name, resourceInputs, opts);
    }
}
exports.LaunchConfiguration = LaunchConfiguration;
/** @internal */
LaunchConfiguration.__pulumiType = 'aws-native:autoscaling:LaunchConfiguration';
//# sourceMappingURL=launchConfiguration.js.map