Class ComputeInstanceGroupManagerUpdatePolicy.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_instance_group_manager.ComputeInstanceGroupManagerUpdatePolicy.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeInstanceGroupManagerUpdatePolicy>
- Enclosing interface:
- ComputeInstanceGroupManagerUpdatePolicy
@Stability(Stable) public static final class ComputeInstanceGroupManagerUpdatePolicy.Builder extends Object implements software.amazon.jsii.Builder<ComputeInstanceGroupManagerUpdatePolicy>
A builder forComputeInstanceGroupManagerUpdatePolicy
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
minimalAction
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy.Builder minimalAction(String minimalAction)
Sets the value ofComputeInstanceGroupManagerUpdatePolicy.getMinimalAction()- Parameters:
minimalAction- Minimal action to be taken on an instance. This parameter is required. You can specify either NONE to forbid any actions, REFRESH to update without stopping instances, RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a REFRESH, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_group_manager#minimal_action ComputeInstanceGroupManager#minimal_action}- Returns:
this
-
type
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy.Builder type(String type)
Sets the value ofComputeInstanceGroupManagerUpdatePolicy.getType()- Parameters:
type- The type of update process. This parameter is required. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_group_manager#type ComputeInstanceGroupManager#type}- Returns:
this
-
maxSurgeFixed
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy.Builder maxSurgeFixed(Number maxSurgeFixed)
Sets the value ofComputeInstanceGroupManagerUpdatePolicy.getMaxSurgeFixed()- Parameters:
maxSurgeFixed- Specifies a fixed number of VM instances. This must be a positive integer. Conflicts with max_surge_percent. Both cannot be 0 Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_group_manager#max_surge_fixed ComputeInstanceGroupManager#max_surge_fixed}- Returns:
this
-
maxSurgePercent
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy.Builder maxSurgePercent(Number maxSurgePercent)
Sets the value ofComputeInstanceGroupManagerUpdatePolicy.getMaxSurgePercent()- Parameters:
maxSurgePercent- Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. Conflicts with max_surge_fixed. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_group_manager#max_surge_percent ComputeInstanceGroupManager#max_surge_percent}- Returns:
this
-
maxUnavailableFixed
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy.Builder maxUnavailableFixed(Number maxUnavailableFixed)
Sets the value ofComputeInstanceGroupManagerUpdatePolicy.getMaxUnavailableFixed()- Parameters:
maxUnavailableFixed- Specifies a fixed number of VM instances. This must be a positive integer. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_group_manager#max_unavailable_fixed ComputeInstanceGroupManager#max_unavailable_fixed}- Returns:
this
-
maxUnavailablePercent
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy.Builder maxUnavailablePercent(Number maxUnavailablePercent)
Sets the value ofComputeInstanceGroupManagerUpdatePolicy.getMaxUnavailablePercent()- Parameters:
maxUnavailablePercent- Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_group_manager#max_unavailable_percent ComputeInstanceGroupManager#max_unavailable_percent}- Returns:
this
-
mostDisruptiveAllowedAction
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy.Builder mostDisruptiveAllowedAction(String mostDisruptiveAllowedAction)
Sets the value ofComputeInstanceGroupManagerUpdatePolicy.getMostDisruptiveAllowedAction()- Parameters:
mostDisruptiveAllowedAction- Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_group_manager#most_disruptive_allowed_action ComputeInstanceGroupManager#most_disruptive_allowed_action}- Returns:
this
-
replacementMethod
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy.Builder replacementMethod(String replacementMethod)
Sets the value ofComputeInstanceGroupManagerUpdatePolicy.getReplacementMethod()- Parameters:
replacementMethod- The instance replacement method for managed instance groups. Valid values are: "RECREATE", "SUBSTITUTE". If SUBSTITUTE (default), the group replaces VM instances with new instances that have randomly generated names. If RECREATE, instance names are preserved. You must also set max_unavailable_fixed or max_unavailable_percent to be greater than 0. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_group_manager#replacement_method ComputeInstanceGroupManager#replacement_method}- Returns:
this
-
build
@Stability(Stable) public ComputeInstanceGroupManagerUpdatePolicy build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeInstanceGroupManagerUpdatePolicy>- Returns:
- a new instance of
ComputeInstanceGroupManagerUpdatePolicy - Throws:
NullPointerException- if any required attribute was not provided
-
-