All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.autoscaling.Group Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.autoscaling;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupState;
import com.pulumi.aws.autoscaling.outputs.GroupInitialLifecycleHook;
import com.pulumi.aws.autoscaling.outputs.GroupInstanceMaintenancePolicy;
import com.pulumi.aws.autoscaling.outputs.GroupInstanceRefresh;
import com.pulumi.aws.autoscaling.outputs.GroupLaunchTemplate;
import com.pulumi.aws.autoscaling.outputs.GroupMixedInstancesPolicy;
import com.pulumi.aws.autoscaling.outputs.GroupTag;
import com.pulumi.aws.autoscaling.outputs.GroupTrafficSource;
import com.pulumi.aws.autoscaling.outputs.GroupWarmPool;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides an Auto Scaling Group resource.
 * 
 * > **Note:** You must specify either `launch_configuration`, `launch_template`, or `mixed_instances_policy`.
 * 
 * > **NOTE on Auto Scaling Groups, Attachments and Traffic Source Attachments:** Pulumi provides standalone Attachment (for attaching Classic Load Balancers and Application Load Balancer, Gateway Load Balancer, or Network Load Balancer target groups) and Traffic Source Attachment (for attaching Load Balancers and VPC Lattice target groups) resources and an Auto Scaling Group resource with `load_balancers`, `target_group_arns` and `traffic_source` attributes. Do not use the same traffic source in more than one of these resources. Doing so will cause a conflict of attachments. A `lifecycle` configuration block can be used to suppress differences if necessary.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.PlacementGroup;
 * import com.pulumi.aws.ec2.PlacementGroupArgs;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupInstanceMaintenancePolicyArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupInitialLifecycleHookArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupTagArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var test = new PlacementGroup("test", PlacementGroupArgs.builder()
 *             .name("test")
 *             .strategy("cluster")
 *             .build());
 * 
 *         var bar = new Group("bar", GroupArgs.builder()
 *             .name("foobar3-test")
 *             .maxSize(5)
 *             .minSize(2)
 *             .healthCheckGracePeriod(300)
 *             .healthCheckType("ELB")
 *             .desiredCapacity(4)
 *             .forceDelete(true)
 *             .placementGroup(test.id())
 *             .launchConfiguration(foobar.name())
 *             .vpcZoneIdentifiers(            
 *                 example1.id(),
 *                 example2.id())
 *             .instanceMaintenancePolicy(GroupInstanceMaintenancePolicyArgs.builder()
 *                 .minHealthyPercentage(90)
 *                 .maxHealthyPercentage(120)
 *                 .build())
 *             .initialLifecycleHooks(GroupInitialLifecycleHookArgs.builder()
 *                 .name("foobar")
 *                 .defaultResult("CONTINUE")
 *                 .heartbeatTimeout(2000)
 *                 .lifecycleTransition("autoscaling:EC2_INSTANCE_LAUNCHING")
 *                 .notificationMetadata(serializeJson(
 *                     jsonObject(
 *                         jsonProperty("foo", "bar")
 *                     )))
 *                 .notificationTargetArn("arn:aws:sqs:us-east-1:444455556666:queue1*")
 *                 .roleArn("arn:aws:iam::123456789012:role/S3Access")
 *                 .build())
 *             .tags(            
 *                 GroupTagArgs.builder()
 *                     .key("foo")
 *                     .value("bar")
 *                     .propagateAtLaunch(true)
 *                     .build(),
 *                 GroupTagArgs.builder()
 *                     .key("lorem")
 *                     .value("ipsum")
 *                     .propagateAtLaunch(false)
 *                     .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### With Latest Version Of Launch Template * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.LaunchTemplate;
 * import com.pulumi.aws.ec2.LaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupLaunchTemplateArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var foobar = new LaunchTemplate("foobar", LaunchTemplateArgs.builder()
 *             .namePrefix("foobar")
 *             .imageId("ami-1a2b3c")
 *             .instanceType("t2.micro")
 *             .build());
 * 
 *         var bar = new Group("bar", GroupArgs.builder()
 *             .availabilityZones("us-east-1a")
 *             .desiredCapacity(1)
 *             .maxSize(1)
 *             .minSize(1)
 *             .launchTemplate(GroupLaunchTemplateArgs.builder()
 *                 .id(foobar.id())
 *                 .version("$Latest")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Mixed Instances Policy * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.LaunchTemplate;
 * import com.pulumi.aws.ec2.LaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var example = new LaunchTemplate("example", LaunchTemplateArgs.builder()
 *             .namePrefix("example")
 *             .imageId(exampleAwsAmi.id())
 *             .instanceType("c5.large")
 *             .build());
 * 
 *         var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
 *             .availabilityZones("us-east-1a")
 *             .desiredCapacity(1)
 *             .maxSize(1)
 *             .minSize(1)
 *             .mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
 *                 .launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
 *                     .launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
 *                         .launchTemplateId(example.id())
 *                         .build())
 *                     .overrides(                    
 *                         GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
 *                             .instanceType("c4.large")
 *                             .weightedCapacity("3")
 *                             .build(),
 *                         GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
 *                             .instanceType("c3.large")
 *                             .weightedCapacity("2")
 *                             .build())
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Mixed Instances Policy with Spot Instances and Capacity Rebalance * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.LaunchTemplate;
 * import com.pulumi.aws.ec2.LaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyInstancesDistributionArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var example = new LaunchTemplate("example", LaunchTemplateArgs.builder()
 *             .namePrefix("example")
 *             .imageId(exampleAwsAmi.id())
 *             .instanceType("c5.large")
 *             .build());
 * 
 *         var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
 *             .capacityRebalance(true)
 *             .desiredCapacity(12)
 *             .maxSize(15)
 *             .minSize(12)
 *             .vpcZoneIdentifiers(            
 *                 example1.id(),
 *                 example2.id())
 *             .mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
 *                 .instancesDistribution(GroupMixedInstancesPolicyInstancesDistributionArgs.builder()
 *                     .onDemandBaseCapacity(0)
 *                     .onDemandPercentageAboveBaseCapacity(25)
 *                     .spotAllocationStrategy("capacity-optimized")
 *                     .build())
 *                 .launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
 *                     .launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
 *                         .launchTemplateId(example.id())
 *                         .build())
 *                     .overrides(                    
 *                         GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
 *                             .instanceType("c4.large")
 *                             .weightedCapacity("3")
 *                             .build(),
 *                         GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
 *                             .instanceType("c3.large")
 *                             .weightedCapacity("2")
 *                             .build())
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Mixed Instances Policy with Instance level LaunchTemplateSpecification Overrides * * When using a diverse instance set, some instance types might require a launch template with configuration values unique to that instance type such as a different AMI (Graviton2), architecture specific user data script, different EBS configuration, or different networking configuration. * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.LaunchTemplate;
 * import com.pulumi.aws.ec2.LaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var example = new LaunchTemplate("example", LaunchTemplateArgs.builder()
 *             .namePrefix("example")
 *             .imageId(exampleAwsAmi.id())
 *             .instanceType("c5.large")
 *             .build());
 * 
 *         var example2 = new LaunchTemplate("example2", LaunchTemplateArgs.builder()
 *             .namePrefix("example2")
 *             .imageId(example2AwsAmi.id())
 *             .build());
 * 
 *         var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
 *             .availabilityZones("us-east-1a")
 *             .desiredCapacity(1)
 *             .maxSize(1)
 *             .minSize(1)
 *             .mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
 *                 .launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
 *                     .launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
 *                         .launchTemplateId(example.id())
 *                         .build())
 *                     .overrides(                    
 *                         GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
 *                             .instanceType("c4.large")
 *                             .weightedCapacity("3")
 *                             .build(),
 *                         GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
 *                             .instanceType("c6g.large")
 *                             .launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateOverrideLaunchTemplateSpecificationArgs.builder()
 *                                 .launchTemplateId(example2.id())
 *                                 .build())
 *                             .weightedCapacity("2")
 *                             .build())
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Mixed Instances Policy with Attribute-based Instance Type Selection * * As an alternative to manually choosing instance types when creating a mixed instances group, you can specify a set of instance attributes that describe your compute requirements. * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.LaunchTemplate;
 * import com.pulumi.aws.ec2.LaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var example = new LaunchTemplate("example", LaunchTemplateArgs.builder()
 *             .namePrefix("example")
 *             .imageId(exampleAwsAmi.id())
 *             .instanceType("c5.large")
 *             .build());
 * 
 *         var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
 *             .availabilityZones("us-east-1a")
 *             .desiredCapacity(1)
 *             .maxSize(1)
 *             .minSize(1)
 *             .mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
 *                 .launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
 *                     .launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
 *                         .launchTemplateId(example.id())
 *                         .build())
 *                     .overrides(GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
 *                         .instanceRequirements(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsArgs.builder()
 *                             .memoryMib(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryMibArgs.builder()
 *                                 .min(1000)
 *                                 .build())
 *                             .vcpuCount(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsVcpuCountArgs.builder()
 *                                 .min(4)
 *                                 .build())
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Dynamic tagging * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupTagArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         final var config = ctx.config();
 *         final var extraTags = config.get("extraTags").orElse(        
 *             %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
 *             %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
 *         var test = new Group("test", GroupArgs.builder()
 *             .tags(            
 *                 GroupTagArgs.builder()
 *                     .key("explicit1")
 *                     .value("value1")
 *                     .propagateAtLaunch(true)
 *                     .build(),
 *                 GroupTagArgs.builder()
 *                     .key("explicit2")
 *                     .value("value2")
 *                     .propagateAtLaunch(true)
 *                     .build())
 *             .name("foobar3-test")
 *             .maxSize(5)
 *             .minSize(2)
 *             .launchConfiguration(foobar.name())
 *             .vpcZoneIdentifiers(            
 *                 example1.id(),
 *                 example2.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Automatically refresh all instances after the group is updated * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.Ec2Functions;
 * import com.pulumi.aws.ec2.inputs.GetAmiArgs;
 * import com.pulumi.aws.ec2.LaunchTemplate;
 * import com.pulumi.aws.ec2.LaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupLaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupTagArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupInstanceRefreshArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupInstanceRefreshPreferencesArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         final var example = Ec2Functions.getAmi(GetAmiArgs.builder()
 *             .mostRecent(true)
 *             .owners("amazon")
 *             .filters(GetAmiFilterArgs.builder()
 *                 .name("name")
 *                 .values("amzn-ami-hvm-*-x86_64-gp2")
 *                 .build())
 *             .build());
 * 
 *         var exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
 *             .imageId(example.applyValue(getAmiResult -> getAmiResult.id()))
 *             .instanceType("t3.nano")
 *             .build());
 * 
 *         var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
 *             .availabilityZones("us-east-1a")
 *             .desiredCapacity(1)
 *             .maxSize(2)
 *             .minSize(1)
 *             .launchTemplate(GroupLaunchTemplateArgs.builder()
 *                 .id(exampleLaunchTemplate.id())
 *                 .version(exampleLaunchTemplate.latestVersion())
 *                 .build())
 *             .tags(GroupTagArgs.builder()
 *                 .key("Key")
 *                 .value("Value")
 *                 .propagateAtLaunch(true)
 *                 .build())
 *             .instanceRefresh(GroupInstanceRefreshArgs.builder()
 *                 .strategy("Rolling")
 *                 .preferences(GroupInstanceRefreshPreferencesArgs.builder()
 *                     .minHealthyPercentage(50)
 *                     .build())
 *                 .triggers("tag")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Auto Scaling group with Warm Pool * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.LaunchTemplate;
 * import com.pulumi.aws.ec2.LaunchTemplateArgs;
 * import com.pulumi.aws.autoscaling.Group;
 * import com.pulumi.aws.autoscaling.GroupArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupWarmPoolArgs;
 * import com.pulumi.aws.autoscaling.inputs.GroupWarmPoolInstanceReusePolicyArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var example = new LaunchTemplate("example", LaunchTemplateArgs.builder()
 *             .namePrefix("example")
 *             .imageId(exampleAwsAmi.id())
 *             .instanceType("c5.large")
 *             .build());
 * 
 *         var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
 *             .availabilityZones("us-east-1a")
 *             .desiredCapacity(1)
 *             .maxSize(5)
 *             .minSize(1)
 *             .warmPool(GroupWarmPoolArgs.builder()
 *                 .poolState("Hibernated")
 *                 .minSize(1)
 *                 .maxGroupPreparedCapacity(10)
 *                 .instanceReusePolicy(GroupWarmPoolInstanceReusePolicyArgs.builder()
 *                     .reuseOnScaleIn(true)
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Auto Scaling group with Traffic Sources * * <!--Start PulumiCodeChooser --> * <!--End PulumiCodeChooser --> * * ## Waiting for Capacity * * A newly-created ASG is initially empty and begins to scale to `min_size` (or * `desired_capacity`, if specified) by launching instances using the provided * Launch Configuration. These instances take time to launch and boot. * * On ASG Update, changes to these values also take time to result in the target * number of instances providing service. * * This provider provides two mechanisms to help consistently manage ASG scale up * time across dependent resources. * * #### Waiting for ASG Capacity * * The first is default behavior. This provider waits after ASG creation for * `min_size` (or `desired_capacity`, if specified) healthy instances to show up * in the ASG before continuing. * * If `min_size` or `desired_capacity` are changed in a subsequent update, * this provider will also wait for the correct number of healthy instances before * continuing. * * This provider considers an instance "healthy" when the ASG reports `HealthStatus: * "Healthy"` and `LifecycleState: "InService"`. See the [AWS AutoScaling * Docs](https://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/AutoScalingGroupLifecycle.html) * for more information on an ASG's lifecycle. * * This provider will wait for healthy instances for up to * `wait_for_capacity_timeout`. If ASG creation is taking more than a few minutes, * it's worth investigating for scaling activity errors, which can be caused by * problems with the selected Launch Configuration. * * Setting `wait_for_capacity_timeout` to `"0"` disables ASG Capacity waiting. * * #### Waiting for ELB Capacity * * The second mechanism is optional, and affects ASGs with attached ELBs specified * via the `load_balancers` attribute or with ALBs specified with `target_group_arns`. * * The `min_elb_capacity` parameter causes the provider to wait for at least the * requested number of instances to show up `"InService"` in all attached ELBs * during ASG creation. It has no effect on ASG updates. * * If `wait_for_elb_capacity` is set, the provider will wait for exactly that number * of Instances to be `"InService"` in all attached ELBs on both creation and * updates. * * These parameters can be used to ensure that service is being provided before * the provider moves on. If new instances don't pass the ELB's health checks for any * reason, the apply will time out, and the ASG will be marked as * tainted (i.e., marked to be destroyed in a follow up run). * * As with ASG Capacity, the provider will wait for up to `wait_for_capacity_timeout` * for the proper number of instances to be healthy. * * #### Troubleshooting Capacity Waiting Timeouts * * If ASG creation takes more than a few minutes, this could indicate one of a * number of configuration problems. See the [AWS Docs on Load Balancer * Troubleshooting](https://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-troubleshooting.html) * for more information. * * ## Import * * Using `pulumi import`, import Auto Scaling Groups using the `name`. For example: * * ```sh * $ pulumi import aws:autoscaling/group:Group web web-asg * ``` * */ @ResourceType(type="aws:autoscaling/group:Group") public class Group extends com.pulumi.resources.CustomResource { /** * ARN for this Auto Scaling Group * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return ARN for this Auto Scaling Group * */ public Output arn() { return this.arn; } /** * A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the `vpc_zone_identifier` attribute, or for attaching a network interface when an existing network interface ID is specified in a launch template. Conflicts with `vpc_zone_identifier`. * */ @Export(name="availabilityZones", refs={List.class,String.class}, tree="[0,1]") private Output> availabilityZones; /** * @return A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the `vpc_zone_identifier` attribute, or for attaching a network interface when an existing network interface ID is specified in a launch template. Conflicts with `vpc_zone_identifier`. * */ public Output> availabilityZones() { return this.availabilityZones; } /** * Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. * */ @Export(name="capacityRebalance", refs={Boolean.class}, tree="[0]") private Output capacityRebalance; /** * @return Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. * */ public Output> capacityRebalance() { return Codegen.optional(this.capacityRebalance); } /** * Reserved. * */ @Export(name="context", refs={String.class}, tree="[0]") private Output context; /** * @return Reserved. * */ public Output> context() { return Codegen.optional(this.context); } /** * Amount of time, in seconds, after a scaling activity completes before another scaling activity can start. * */ @Export(name="defaultCooldown", refs={Integer.class}, tree="[0]") private Output defaultCooldown; /** * @return Amount of time, in seconds, after a scaling activity completes before another scaling activity can start. * */ public Output defaultCooldown() { return this.defaultCooldown; } /** * Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html)) * */ @Export(name="defaultInstanceWarmup", refs={Integer.class}, tree="[0]") private Output defaultInstanceWarmup; /** * @return Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html)) * */ public Output> defaultInstanceWarmup() { return Codegen.optional(this.defaultInstanceWarmup); } /** * Number of Amazon EC2 instances that * should be running in the group. (See also Waiting for * Capacity below.) * */ @Export(name="desiredCapacity", refs={Integer.class}, tree="[0]") private Output desiredCapacity; /** * @return Number of Amazon EC2 instances that * should be running in the group. (See also Waiting for * Capacity below.) * */ public Output desiredCapacity() { return this.desiredCapacity; } /** * The unit of measurement for the value specified for `desired_capacity`. Supported for attribute-based instance type selection only. Valid values: `"units"`, `"vcpu"`, `"memory-mib"`. * */ @Export(name="desiredCapacityType", refs={String.class}, tree="[0]") private Output desiredCapacityType; /** * @return The unit of measurement for the value specified for `desired_capacity`. Supported for attribute-based instance type selection only. Valid values: `"units"`, `"vcpu"`, `"memory-mib"`. * */ public Output> desiredCapacityType() { return Codegen.optional(this.desiredCapacityType); } /** * List of metrics to collect. The allowed values are defined by the [underlying AWS API](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html). * */ @Export(name="enabledMetrics", refs={List.class,String.class}, tree="[0,1]") private Output> enabledMetrics; /** * @return List of metrics to collect. The allowed values are defined by the [underlying AWS API](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html). * */ public Output>> enabledMetrics() { return Codegen.optional(this.enabledMetrics); } /** * Allows deleting the Auto Scaling Group without waiting * for all instances in the pool to terminate. You can force an Auto Scaling Group to delete * even if it's in the process of scaling a resource. Normally, this provider * drains all the instances before deleting the group. This bypasses that * behavior and potentially leaves resources dangling. * */ @Export(name="forceDelete", refs={Boolean.class}, tree="[0]") private Output forceDelete; /** * @return Allows deleting the Auto Scaling Group without waiting * for all instances in the pool to terminate. You can force an Auto Scaling Group to delete * even if it's in the process of scaling a resource. Normally, this provider * drains all the instances before deleting the group. This bypasses that * behavior and potentially leaves resources dangling. * */ public Output> forceDelete() { return Codegen.optional(this.forceDelete); } /** * Allows deleting the Auto Scaling Group without waiting for all instances in the warm pool to terminate. * */ @Export(name="forceDeleteWarmPool", refs={Boolean.class}, tree="[0]") private Output forceDeleteWarmPool; /** * @return Allows deleting the Auto Scaling Group without waiting for all instances in the warm pool to terminate. * */ public Output> forceDeleteWarmPool() { return Codegen.optional(this.forceDeleteWarmPool); } /** * Time (in seconds) after instance comes into service before checking health. * */ @Export(name="healthCheckGracePeriod", refs={Integer.class}, tree="[0]") private Output healthCheckGracePeriod; /** * @return Time (in seconds) after instance comes into service before checking health. * */ public Output> healthCheckGracePeriod() { return Codegen.optional(this.healthCheckGracePeriod); } /** * "EC2" or "ELB". Controls how health checking is done. * */ @Export(name="healthCheckType", refs={String.class}, tree="[0]") private Output healthCheckType; /** * @return "EC2" or "ELB". Controls how health checking is done. * */ public Output healthCheckType() { return this.healthCheckType; } /** * Whether to ignore failed [Auto Scaling scaling activities](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) while waiting for capacity. The default is `false` -- failed scaling activities cause errors to be returned. * */ @Export(name="ignoreFailedScalingActivities", refs={Boolean.class}, tree="[0]") private Output ignoreFailedScalingActivities; /** * @return Whether to ignore failed [Auto Scaling scaling activities](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) while waiting for capacity. The default is `false` -- failed scaling activities cause errors to be returned. * */ public Output> ignoreFailedScalingActivities() { return Codegen.optional(this.ignoreFailedScalingActivities); } /** * One or more * [Lifecycle Hooks](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) * to attach to the Auto Scaling Group **before** instances are launched. The * syntax is exactly the same as the separate * `aws.autoscaling.LifecycleHook` * resource, without the `autoscaling_group_name` attribute. Please note that this will only work when creating * a new Auto Scaling Group. For all other use-cases, please use `aws.autoscaling.LifecycleHook` resource. * */ @Export(name="initialLifecycleHooks", refs={List.class,GroupInitialLifecycleHook.class}, tree="[0,1]") private Output> initialLifecycleHooks; /** * @return One or more * [Lifecycle Hooks](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) * to attach to the Auto Scaling Group **before** instances are launched. The * syntax is exactly the same as the separate * `aws.autoscaling.LifecycleHook` * resource, without the `autoscaling_group_name` attribute. Please note that this will only work when creating * a new Auto Scaling Group. For all other use-cases, please use `aws.autoscaling.LifecycleHook` resource. * */ public Output>> initialLifecycleHooks() { return Codegen.optional(this.initialLifecycleHooks); } /** * If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below. * */ @Export(name="instanceMaintenancePolicy", refs={GroupInstanceMaintenancePolicy.class}, tree="[0]") private Output instanceMaintenancePolicy; /** * @return If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below. * */ public Output> instanceMaintenancePolicy() { return Codegen.optional(this.instanceMaintenancePolicy); } /** * If this block is configured, start an * [Instance Refresh](https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) * when this Auto Scaling Group is updated. Defined below. * */ @Export(name="instanceRefresh", refs={GroupInstanceRefresh.class}, tree="[0]") private Output instanceRefresh; /** * @return If this block is configured, start an * [Instance Refresh](https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) * when this Auto Scaling Group is updated. Defined below. * */ public Output> instanceRefresh() { return Codegen.optional(this.instanceRefresh); } /** * Name of the launch configuration to use. * */ @Export(name="launchConfiguration", refs={String.class}, tree="[0]") private Output launchConfiguration; /** * @return Name of the launch configuration to use. * */ public Output> launchConfiguration() { return Codegen.optional(this.launchConfiguration); } /** * Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details. * */ @Export(name="launchTemplate", refs={GroupLaunchTemplate.class}, tree="[0]") private Output launchTemplate; /** * @return Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details. * */ public Output launchTemplate() { return this.launchTemplate; } /** * List of elastic load balancer names to add to the autoscaling * group names. Only valid for classic load balancers. For ALBs, use `target_group_arns` instead. To remove all load balancer attachments an empty list should be specified. * */ @Export(name="loadBalancers", refs={List.class,String.class}, tree="[0,1]") private Output> loadBalancers; /** * @return List of elastic load balancer names to add to the autoscaling * group names. Only valid for classic load balancers. For ALBs, use `target_group_arns` instead. To remove all load balancer attachments an empty list should be specified. * */ public Output> loadBalancers() { return this.loadBalancers; } /** * Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds. * */ @Export(name="maxInstanceLifetime", refs={Integer.class}, tree="[0]") private Output maxInstanceLifetime; /** * @return Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds. * */ public Output> maxInstanceLifetime() { return Codegen.optional(this.maxInstanceLifetime); } /** * Maximum size of the Auto Scaling Group. * */ @Export(name="maxSize", refs={Integer.class}, tree="[0]") private Output maxSize; /** * @return Maximum size of the Auto Scaling Group. * */ public Output maxSize() { return this.maxSize; } /** * Granularity to associate with the metrics to collect. The only valid value is `1Minute`. Default is `1Minute`. * */ @Export(name="metricsGranularity", refs={String.class}, tree="[0]") private Output metricsGranularity; /** * @return Granularity to associate with the metrics to collect. The only valid value is `1Minute`. Default is `1Minute`. * */ public Output> metricsGranularity() { return Codegen.optional(this.metricsGranularity); } /** * Setting this causes Pulumi to wait for * this number of instances from this Auto Scaling Group to show up healthy in the * ELB only on creation. Updates will not wait on ELB instance number changes. * (See also Waiting for Capacity below.) * */ @Export(name="minElbCapacity", refs={Integer.class}, tree="[0]") private Output minElbCapacity; /** * @return Setting this causes Pulumi to wait for * this number of instances from this Auto Scaling Group to show up healthy in the * ELB only on creation. Updates will not wait on ELB instance number changes. * (See also Waiting for Capacity below.) * */ public Output> minElbCapacity() { return Codegen.optional(this.minElbCapacity); } /** * Minimum size of the Auto Scaling Group. * (See also Waiting for Capacity below.) * */ @Export(name="minSize", refs={Integer.class}, tree="[0]") private Output minSize; /** * @return Minimum size of the Auto Scaling Group. * (See also Waiting for Capacity below.) * */ public Output minSize() { return this.minSize; } /** * Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details. * */ @Export(name="mixedInstancesPolicy", refs={GroupMixedInstancesPolicy.class}, tree="[0]") private Output mixedInstancesPolicy; /** * @return Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details. * */ public Output mixedInstancesPolicy() { return this.mixedInstancesPolicy; } /** * Name of the Auto Scaling Group. By default generated by Pulumi. Conflicts with `name_prefix`. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Name of the Auto Scaling Group. By default generated by Pulumi. Conflicts with `name_prefix`. * */ public Output name() { return this.name; } /** * Creates a unique name beginning with the specified * prefix. Conflicts with `name`. * */ @Export(name="namePrefix", refs={String.class}, tree="[0]") private Output namePrefix; /** * @return Creates a unique name beginning with the specified * prefix. Conflicts with `name`. * */ public Output namePrefix() { return this.namePrefix; } /** * Name of the placement group into which you'll launch your instances, if any. * */ @Export(name="placementGroup", refs={String.class}, tree="[0]") private Output placementGroup; /** * @return Name of the placement group into which you'll launch your instances, if any. * */ public Output> placementGroup() { return Codegen.optional(this.placementGroup); } /** * Predicted capacity of the group. * */ @Export(name="predictedCapacity", refs={Integer.class}, tree="[0]") private Output predictedCapacity; /** * @return Predicted capacity of the group. * */ public Output predictedCapacity() { return this.predictedCapacity; } /** * Whether newly launched instances * are automatically protected from termination by Amazon EC2 Auto Scaling when * scaling in. For more information about preventing instances from terminating * on scale in, see [Using instance scale-in protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) * in the Amazon EC2 Auto Scaling User Guide. * */ @Export(name="protectFromScaleIn", refs={Boolean.class}, tree="[0]") private Output protectFromScaleIn; /** * @return Whether newly launched instances * are automatically protected from termination by Amazon EC2 Auto Scaling when * scaling in. For more information about preventing instances from terminating * on scale in, see [Using instance scale-in protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) * in the Amazon EC2 Auto Scaling User Guide. * */ public Output> protectFromScaleIn() { return Codegen.optional(this.protectFromScaleIn); } /** * ARN of the service-linked role that the ASG will use to call other AWS services * */ @Export(name="serviceLinkedRoleArn", refs={String.class}, tree="[0]") private Output serviceLinkedRoleArn; /** * @return ARN of the service-linked role that the ASG will use to call other AWS services * */ public Output serviceLinkedRoleArn() { return this.serviceLinkedRoleArn; } /** * List of processes to suspend for the Auto Scaling Group. The allowed values are `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. * Note that if you suspend either the `Launch` or `Terminate` process types, it can prevent your Auto Scaling Group from functioning properly. * */ @Export(name="suspendedProcesses", refs={List.class,String.class}, tree="[0,1]") private Output> suspendedProcesses; /** * @return List of processes to suspend for the Auto Scaling Group. The allowed values are `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. * Note that if you suspend either the `Launch` or `Terminate` process types, it can prevent your Auto Scaling Group from functioning properly. * */ public Output>> suspendedProcesses() { return Codegen.optional(this.suspendedProcesses); } /** * Configuration block(s) containing resource tags. See Tag below for more details. * */ @Export(name="tags", refs={List.class,GroupTag.class}, tree="[0,1]") private Output> tags; /** * @return Configuration block(s) containing resource tags. See Tag below for more details. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Set of `aws.alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. To remove all target group attachments an empty list should be specified. * */ @Export(name="targetGroupArns", refs={List.class,String.class}, tree="[0,1]") private Output> targetGroupArns; /** * @return Set of `aws.alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. To remove all target group attachments an empty list should be specified. * */ public Output> targetGroupArns() { return this.targetGroupArns; } /** * List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`. Additionally, the ARN of a Lambda function can be specified for custom termination policies. * */ @Export(name="terminationPolicies", refs={List.class,String.class}, tree="[0,1]") private Output> terminationPolicies; /** * @return List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`. Additionally, the ARN of a Lambda function can be specified for custom termination policies. * */ public Output>> terminationPolicies() { return Codegen.optional(this.terminationPolicies); } /** * Attaches one or more traffic sources to the specified Auto Scaling group. * */ @Export(name="trafficSources", refs={List.class,GroupTrafficSource.class}, tree="[0,1]") private Output> trafficSources; /** * @return Attaches one or more traffic sources to the specified Auto Scaling group. * */ public Output> trafficSources() { return this.trafficSources; } /** * List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availability_zones`. * */ @Export(name="vpcZoneIdentifiers", refs={List.class,String.class}, tree="[0,1]") private Output> vpcZoneIdentifiers; /** * @return List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availability_zones`. * */ public Output> vpcZoneIdentifiers() { return this.vpcZoneIdentifiers; } /** * Maximum * [duration](https://golang.org/pkg/time/#ParseDuration) that the provider should * wait for ASG instances to be healthy before timing out. (See also Waiting * for Capacity below.) Setting this to "0" causes * the provider to skip all Capacity Waiting behavior. * */ @Export(name="waitForCapacityTimeout", refs={String.class}, tree="[0]") private Output waitForCapacityTimeout; /** * @return Maximum * [duration](https://golang.org/pkg/time/#ParseDuration) that the provider should * wait for ASG instances to be healthy before timing out. (See also Waiting * for Capacity below.) Setting this to "0" causes * the provider to skip all Capacity Waiting behavior. * */ public Output> waitForCapacityTimeout() { return Codegen.optional(this.waitForCapacityTimeout); } /** * Setting this will cause Pulumi to wait * for exactly this number of healthy instances from this Auto Scaling Group in * all attached load balancers on both create and update operations. (Takes * precedence over `min_elb_capacity` behavior.) * (See also Waiting for Capacity below.) * */ @Export(name="waitForElbCapacity", refs={Integer.class}, tree="[0]") private Output waitForElbCapacity; /** * @return Setting this will cause Pulumi to wait * for exactly this number of healthy instances from this Auto Scaling Group in * all attached load balancers on both create and update operations. (Takes * precedence over `min_elb_capacity` behavior.) * (See also Waiting for Capacity below.) * */ public Output> waitForElbCapacity() { return Codegen.optional(this.waitForElbCapacity); } /** * If this block is configured, add a [Warm Pool](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) * to the specified Auto Scaling group. Defined below * */ @Export(name="warmPool", refs={GroupWarmPool.class}, tree="[0]") private Output warmPool; /** * @return If this block is configured, add a [Warm Pool](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) * to the specified Auto Scaling group. Defined below * */ public Output> warmPool() { return Codegen.optional(this.warmPool); } /** * Current size of the warm pool. * */ @Export(name="warmPoolSize", refs={Integer.class}, tree="[0]") private Output warmPoolSize; /** * @return Current size of the warm pool. * */ public Output warmPoolSize() { return this.warmPoolSize; } /** * * @param name The _unique_ name of the resulting resource. */ public Group(java.lang.String name) { this(name, GroupArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Group(java.lang.String name, GroupArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Group(java.lang.String name, GroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:autoscaling/group:Group", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Group(java.lang.String name, Output id, @Nullable GroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:autoscaling/group:Group", name, state, makeResourceOptions(options, id), false); } private static GroupArgs makeArgs(GroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? GroupArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host 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 * @param options Optional settings to control the behavior of the CustomResource. */ public static Group get(java.lang.String name, Output id, @Nullable GroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Group(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy