Class MixedInstancesPolicy.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.MixedInstancesPolicy.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<MixedInstancesPolicy>
- Enclosing interface:
MixedInstancesPolicy
@Stability(Stable)
public static final class MixedInstancesPolicy.Builder
extends Object
implements software.amazon.jsii.Builder<MixedInstancesPolicy>
A builder for
MixedInstancesPolicy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.instancesDistribution
(InstancesDistribution instancesDistribution) Sets the value ofMixedInstancesPolicy.getInstancesDistribution()
launchTemplate
(ILaunchTemplate launchTemplate) Sets the value ofMixedInstancesPolicy.getLaunchTemplate()
launchTemplateOverrides
(List<? extends LaunchTemplateOverrides> launchTemplateOverrides) Sets the value ofMixedInstancesPolicy.getLaunchTemplateOverrides()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
launchTemplate
@Stability(Stable) public MixedInstancesPolicy.Builder launchTemplate(ILaunchTemplate launchTemplate) Sets the value ofMixedInstancesPolicy.getLaunchTemplate()
- Parameters:
launchTemplate
- Launch template to use. This parameter is required.- Returns:
this
-
instancesDistribution
@Stability(Stable) public MixedInstancesPolicy.Builder instancesDistribution(InstancesDistribution instancesDistribution) Sets the value ofMixedInstancesPolicy.getInstancesDistribution()
- Parameters:
instancesDistribution
- InstancesDistribution to use.- Returns:
this
-
launchTemplateOverrides
@Stability(Stable) public MixedInstancesPolicy.Builder launchTemplateOverrides(List<? extends LaunchTemplateOverrides> launchTemplateOverrides) Sets the value ofMixedInstancesPolicy.getLaunchTemplateOverrides()
- Parameters:
launchTemplateOverrides
- Launch template overrides. The maximum number of instance types that can be associated with an Auto Scaling group is 40.The maximum number of distinct launch templates you can define for an Auto Scaling group is 20.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<MixedInstancesPolicy>
- Returns:
- a new instance of
MixedInstancesPolicy
- Throws:
NullPointerException
- if any required attribute was not provided
-