"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.AutoScalingGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The ``AWS::AutoScaling::AutoScalingGroup`` resource defines an Amazon EC2 Auto Scaling group, which is a collection of Amazon EC2 instances that are treated as a logical grouping for the purposes of automatic scaling and management.
 *  For more information about Amazon EC2 Auto Scaling, see the [Amazon EC2 Auto Scaling User Guide](https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html).
 *   Amazon EC2 Auto Scaling configures instances launched as part of an Auto Scaling group using either a [launch template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html) or a launch configuration. We strongly recommend that you do not use launch configurations. For more information, see [Launch configurations](https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-configurations.html) in the *Amazon EC2 Auto Scaling User Guide*.
 *  For help migrating from launch configurations to launch templates, see [Migrate CloudFormation stacks from launch configurations to launch templates](https://docs.aws.amazon.com/autoscaling/ec2/userguide/migrate-launch-configurations-with-cloudformation.html) in the *Amazon EC2 Auto Scaling User Guide*.
 */
class AutoScalingGroup extends pulumi.CustomResource {
    /**
     * Get an existing AutoScalingGroup 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 AutoScalingGroup(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of AutoScalingGroup.  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'] === AutoScalingGroup.__pulumiType;
    }
    /**
     * Create a AutoScalingGroup 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 || args.maxSize === undefined) && !opts.urn) {
                throw new Error("Missing required property 'maxSize'");
            }
            if ((!args || args.minSize === undefined) && !opts.urn) {
                throw new Error("Missing required property 'minSize'");
            }
            resourceInputs["autoScalingGroupName"] = args ? args.autoScalingGroupName : undefined;
            resourceInputs["availabilityZoneDistribution"] = args ? args.availabilityZoneDistribution : undefined;
            resourceInputs["availabilityZoneImpairmentPolicy"] = args ? args.availabilityZoneImpairmentPolicy : undefined;
            resourceInputs["availabilityZones"] = args ? args.availabilityZones : undefined;
            resourceInputs["capacityRebalance"] = args ? args.capacityRebalance : undefined;
            resourceInputs["capacityReservationSpecification"] = args ? args.capacityReservationSpecification : undefined;
            resourceInputs["context"] = args ? args.context : undefined;
            resourceInputs["cooldown"] = args ? args.cooldown : undefined;
            resourceInputs["defaultInstanceWarmup"] = args ? args.defaultInstanceWarmup : undefined;
            resourceInputs["desiredCapacity"] = args ? args.desiredCapacity : undefined;
            resourceInputs["desiredCapacityType"] = args ? args.desiredCapacityType : undefined;
            resourceInputs["healthCheckGracePeriod"] = args ? args.healthCheckGracePeriod : undefined;
            resourceInputs["healthCheckType"] = args ? args.healthCheckType : undefined;
            resourceInputs["instanceId"] = args ? args.instanceId : undefined;
            resourceInputs["instanceMaintenancePolicy"] = args ? args.instanceMaintenancePolicy : undefined;
            resourceInputs["launchConfigurationName"] = args ? args.launchConfigurationName : undefined;
            resourceInputs["launchTemplate"] = args ? args.launchTemplate : undefined;
            resourceInputs["lifecycleHookSpecificationList"] = args ? args.lifecycleHookSpecificationList : undefined;
            resourceInputs["loadBalancerNames"] = args ? args.loadBalancerNames : undefined;
            resourceInputs["maxInstanceLifetime"] = args ? args.maxInstanceLifetime : undefined;
            resourceInputs["maxSize"] = args ? args.maxSize : undefined;
            resourceInputs["metricsCollection"] = args ? args.metricsCollection : undefined;
            resourceInputs["minSize"] = args ? args.minSize : undefined;
            resourceInputs["mixedInstancesPolicy"] = args ? args.mixedInstancesPolicy : undefined;
            resourceInputs["newInstancesProtectedFromScaleIn"] = args ? args.newInstancesProtectedFromScaleIn : undefined;
            resourceInputs["notificationConfiguration"] = args ? args.notificationConfiguration : undefined;
            resourceInputs["notificationConfigurations"] = args ? args.notificationConfigurations : undefined;
            resourceInputs["placementGroup"] = args ? args.placementGroup : undefined;
            resourceInputs["serviceLinkedRoleArn"] = args ? args.serviceLinkedRoleArn : undefined;
            resourceInputs["skipZonalShiftValidation"] = args ? args.skipZonalShiftValidation : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["targetGroupArns"] = args ? args.targetGroupArns : undefined;
            resourceInputs["terminationPolicies"] = args ? args.terminationPolicies : undefined;
            resourceInputs["trafficSources"] = args ? args.trafficSources : undefined;
            resourceInputs["vpcZoneIdentifier"] = args ? args.vpcZoneIdentifier : undefined;
            resourceInputs["autoScalingGroupArn"] = undefined /*out*/;
        }
        else {
            resourceInputs["autoScalingGroupArn"] = undefined /*out*/;
            resourceInputs["autoScalingGroupName"] = undefined /*out*/;
            resourceInputs["availabilityZoneDistribution"] = undefined /*out*/;
            resourceInputs["availabilityZoneImpairmentPolicy"] = undefined /*out*/;
            resourceInputs["availabilityZones"] = undefined /*out*/;
            resourceInputs["capacityRebalance"] = undefined /*out*/;
            resourceInputs["capacityReservationSpecification"] = undefined /*out*/;
            resourceInputs["context"] = undefined /*out*/;
            resourceInputs["cooldown"] = undefined /*out*/;
            resourceInputs["defaultInstanceWarmup"] = undefined /*out*/;
            resourceInputs["desiredCapacity"] = undefined /*out*/;
            resourceInputs["desiredCapacityType"] = undefined /*out*/;
            resourceInputs["healthCheckGracePeriod"] = undefined /*out*/;
            resourceInputs["healthCheckType"] = undefined /*out*/;
            resourceInputs["instanceId"] = undefined /*out*/;
            resourceInputs["instanceMaintenancePolicy"] = undefined /*out*/;
            resourceInputs["launchConfigurationName"] = undefined /*out*/;
            resourceInputs["launchTemplate"] = undefined /*out*/;
            resourceInputs["lifecycleHookSpecificationList"] = undefined /*out*/;
            resourceInputs["loadBalancerNames"] = undefined /*out*/;
            resourceInputs["maxInstanceLifetime"] = undefined /*out*/;
            resourceInputs["maxSize"] = undefined /*out*/;
            resourceInputs["metricsCollection"] = undefined /*out*/;
            resourceInputs["minSize"] = undefined /*out*/;
            resourceInputs["mixedInstancesPolicy"] = undefined /*out*/;
            resourceInputs["newInstancesProtectedFromScaleIn"] = undefined /*out*/;
            resourceInputs["notificationConfiguration"] = undefined /*out*/;
            resourceInputs["notificationConfigurations"] = undefined /*out*/;
            resourceInputs["placementGroup"] = undefined /*out*/;
            resourceInputs["serviceLinkedRoleArn"] = undefined /*out*/;
            resourceInputs["skipZonalShiftValidation"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["targetGroupArns"] = undefined /*out*/;
            resourceInputs["terminationPolicies"] = undefined /*out*/;
            resourceInputs["trafficSources"] = undefined /*out*/;
            resourceInputs["vpcZoneIdentifier"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["autoScalingGroupName", "instanceId"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(AutoScalingGroup.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AutoScalingGroup = AutoScalingGroup;
/** @internal */
AutoScalingGroup.__pulumiType = 'aws-native:autoscaling:AutoScalingGroup';
//# sourceMappingURL=autoScalingGroup.js.map