UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

139 lines • 9.33 kB
"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, { ...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?.maxSize === undefined && !opts.urn) { throw new Error("Missing required property 'maxSize'"); } if (args?.minSize === undefined && !opts.urn) { throw new Error("Missing required property 'minSize'"); } resourceInputs["autoScalingGroupName"] = args?.autoScalingGroupName; resourceInputs["availabilityZoneDistribution"] = args?.availabilityZoneDistribution; resourceInputs["availabilityZoneImpairmentPolicy"] = args?.availabilityZoneImpairmentPolicy; resourceInputs["availabilityZones"] = args?.availabilityZones; resourceInputs["capacityRebalance"] = args?.capacityRebalance; resourceInputs["capacityReservationSpecification"] = args?.capacityReservationSpecification; resourceInputs["context"] = args?.context; resourceInputs["cooldown"] = args?.cooldown; resourceInputs["defaultInstanceWarmup"] = args?.defaultInstanceWarmup; resourceInputs["desiredCapacity"] = args?.desiredCapacity; resourceInputs["desiredCapacityType"] = args?.desiredCapacityType; resourceInputs["healthCheckGracePeriod"] = args?.healthCheckGracePeriod; resourceInputs["healthCheckType"] = args?.healthCheckType; resourceInputs["instanceId"] = args?.instanceId; resourceInputs["instanceLifecyclePolicy"] = args?.instanceLifecyclePolicy; resourceInputs["instanceMaintenancePolicy"] = args?.instanceMaintenancePolicy; resourceInputs["launchConfigurationName"] = args?.launchConfigurationName; resourceInputs["launchTemplate"] = args?.launchTemplate; resourceInputs["lifecycleHookSpecificationList"] = args?.lifecycleHookSpecificationList; resourceInputs["loadBalancerNames"] = args?.loadBalancerNames; resourceInputs["maxInstanceLifetime"] = args?.maxInstanceLifetime; resourceInputs["maxSize"] = args?.maxSize; resourceInputs["metricsCollection"] = args?.metricsCollection; resourceInputs["minSize"] = args?.minSize; resourceInputs["mixedInstancesPolicy"] = args?.mixedInstancesPolicy; resourceInputs["newInstancesProtectedFromScaleIn"] = args?.newInstancesProtectedFromScaleIn; resourceInputs["notificationConfiguration"] = args?.notificationConfiguration; resourceInputs["notificationConfigurations"] = args?.notificationConfigurations; resourceInputs["placementGroup"] = args?.placementGroup; resourceInputs["serviceLinkedRoleArn"] = args?.serviceLinkedRoleArn; resourceInputs["skipZonalShiftValidation"] = args?.skipZonalShiftValidation; resourceInputs["tags"] = args?.tags; resourceInputs["targetGroupArns"] = args?.targetGroupArns; resourceInputs["terminationPolicies"] = args?.terminationPolicies; resourceInputs["trafficSources"] = args?.trafficSources; resourceInputs["vpcZoneIdentifier"] = args?.vpcZoneIdentifier; 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["instanceLifecyclePolicy"] = 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