Class AutoScalingGroupOptions.Builder
java.lang.Object
software.amazon.awscdk.services.eks.AutoScalingGroupOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AutoScalingGroupOptions>
- Enclosing interface:
- AutoScalingGroupOptions
@Stability(Stable)
public static final class AutoScalingGroupOptions.Builder
extends Object
implements software.amazon.jsii.Builder<AutoScalingGroupOptions>
A builder for
AutoScalingGroupOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbootstrapEnabled(Boolean bootstrapEnabled) Sets the value ofAutoScalingGroupOptions.getBootstrapEnabled()bootstrapOptions(BootstrapOptions bootstrapOptions) Sets the value ofAutoScalingGroupOptions.getBootstrapOptions()build()Builds the configured instance.machineImageType(MachineImageType machineImageType) Sets the value ofAutoScalingGroupOptions.getMachineImageType()Sets the value ofAutoScalingGroupOptions.getMapRole()spotInterruptHandler(Boolean spotInterruptHandler) Sets the value ofAutoScalingGroupOptions.getSpotInterruptHandler()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bootstrapEnabled
@Stability(Stable) public AutoScalingGroupOptions.Builder bootstrapEnabled(Boolean bootstrapEnabled) Sets the value ofAutoScalingGroupOptions.getBootstrapEnabled()- Parameters:
bootstrapEnabled- Configures the EC2 user-data script for instances in this autoscaling group to bootstrap the node (invoke/etc/eks/bootstrap.sh) and associate it with the EKS cluster. If you wish to provide a custom user data script, set this tofalseand manually invokeautoscalingGroup.addUserData().- Returns:
this
-
bootstrapOptions
@Stability(Stable) public AutoScalingGroupOptions.Builder bootstrapOptions(BootstrapOptions bootstrapOptions) Sets the value ofAutoScalingGroupOptions.getBootstrapOptions()- Parameters:
bootstrapOptions- Allows options for node bootstrapping through EC2 user data.- Returns:
this
-
machineImageType
@Stability(Stable) public AutoScalingGroupOptions.Builder machineImageType(MachineImageType machineImageType) Sets the value ofAutoScalingGroupOptions.getMachineImageType()- Parameters:
machineImageType- Allow options to specify different machine image type.- Returns:
this
-
mapRole
Sets the value ofAutoScalingGroupOptions.getMapRole()- Parameters:
mapRole- Will automatically update the aws-auth ConfigMap to map the IAM instance role to RBAC. This cannot be explicitly set totrueif the cluster has kubectl disabled.- Returns:
this
-
spotInterruptHandler
@Stability(Stable) public AutoScalingGroupOptions.Builder spotInterruptHandler(Boolean spotInterruptHandler) Sets the value ofAutoScalingGroupOptions.getSpotInterruptHandler()- Parameters:
spotInterruptHandler- Installs the AWS spot instance interrupt handler on the cluster if it's not already added. Only relevant ifspotPriceis configured on the auto-scaling group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AutoScalingGroupOptions>- Returns:
- a new instance of
AutoScalingGroupOptions - Throws:
NullPointerException- if any required attribute was not provided
-