Interface Instance.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<Instance.Builder,Instance>,SdkBuilder<Instance.Builder,Instance>,SdkPojo
- Enclosing class:
- Instance
public static interface Instance.Builder extends SdkPojo, CopyableBuilder<Instance.Builder,Instance>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Instance.BuilderavailabilityZone(String availabilityZone)The Availability Zone in which the instance is running.Instance.BuilderhealthStatus(String healthStatus)The last reported health status of the instance.Instance.BuilderinstanceId(String instanceId)The ID of the instance.Instance.BuilderinstanceType(String instanceType)The instance type of the EC2 instance.Instance.BuilderlaunchConfigurationName(String launchConfigurationName)The launch configuration associated with the instance.default Instance.BuilderlaunchTemplate(Consumer<LaunchTemplateSpecification.Builder> launchTemplate)The launch template for the instance.Instance.BuilderlaunchTemplate(LaunchTemplateSpecification launchTemplate)The launch template for the instance.Instance.BuilderlifecycleState(String lifecycleState)A description of the current lifecycle state.Instance.BuilderlifecycleState(LifecycleState lifecycleState)A description of the current lifecycle state.Instance.BuilderprotectedFromScaleIn(Boolean protectedFromScaleIn)Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.Instance.BuilderweightedCapacity(String weightedCapacity)The number of capacity units contributed by the instance based on its instance type.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
instanceId
Instance.Builder instanceId(String instanceId)
The ID of the instance.
- Parameters:
instanceId- The ID of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceType
Instance.Builder instanceType(String instanceType)
The instance type of the EC2 instance.
- Parameters:
instanceType- The instance type of the EC2 instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
availabilityZone
Instance.Builder availabilityZone(String availabilityZone)
The Availability Zone in which the instance is running.
- Parameters:
availabilityZone- The Availability Zone in which the instance is running.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
lifecycleState
Instance.Builder lifecycleState(String lifecycleState)
A description of the current lifecycle state. The
Quarantinedstate is not used. For more information, see Amazon EC2 Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.- Parameters:
lifecycleState- A description of the current lifecycle state. TheQuarantinedstate is not used. For more information, see Amazon EC2 Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
LifecycleState,LifecycleState
-
lifecycleState
Instance.Builder lifecycleState(LifecycleState lifecycleState)
A description of the current lifecycle state. The
Quarantinedstate is not used. For more information, see Amazon EC2 Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.- Parameters:
lifecycleState- A description of the current lifecycle state. TheQuarantinedstate is not used. For more information, see Amazon EC2 Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
LifecycleState,LifecycleState
-
healthStatus
Instance.Builder healthStatus(String healthStatus)
The last reported health status of the instance.
Healthymeans that the instance is healthy and should remain in service.Unhealthymeans that the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate and replace it.- Parameters:
healthStatus- The last reported health status of the instance.Healthymeans that the instance is healthy and should remain in service.Unhealthymeans that the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate and replace it.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchConfigurationName
Instance.Builder launchConfigurationName(String launchConfigurationName)
The launch configuration associated with the instance.
- Parameters:
launchConfigurationName- The launch configuration associated with the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchTemplate
Instance.Builder launchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template for the instance.
- Parameters:
launchTemplate- The launch template for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchTemplate
default Instance.Builder launchTemplate(Consumer<LaunchTemplateSpecification.Builder> launchTemplate)
The launch template for the instance.
This is a convenience method that creates an instance of theLaunchTemplateSpecification.Builderavoiding the need to create one manually viaLaunchTemplateSpecification.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tolaunchTemplate(LaunchTemplateSpecification).- Parameters:
launchTemplate- a consumer that will call methods onLaunchTemplateSpecification.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
launchTemplate(LaunchTemplateSpecification)
-
protectedFromScaleIn
Instance.Builder protectedFromScaleIn(Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
- Parameters:
protectedFromScaleIn- Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
weightedCapacity
Instance.Builder weightedCapacity(String weightedCapacity)
The number of capacity units contributed by the instance based on its instance type.
Valid Range: Minimum value of 1. Maximum value of 999.
- Parameters:
weightedCapacity- The number of capacity units contributed by the instance based on its instance type.Valid Range: Minimum value of 1. Maximum value of 999.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-