Class ComputeInstanceScheduling.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_instance.ComputeInstanceScheduling.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeInstanceScheduling>
- Enclosing interface:
- ComputeInstanceScheduling
@Stability(Stable) public static final class ComputeInstanceScheduling.Builder extends Object implements software.amazon.jsii.Builder<ComputeInstanceScheduling>
A builder forComputeInstanceScheduling
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
automaticRestart
@Stability(Stable) public ComputeInstanceScheduling.Builder automaticRestart(Boolean automaticRestart)
Sets the value ofComputeInstanceScheduling.getAutomaticRestart()- Parameters:
automaticRestart- Specifies if the instance should be restarted if it was terminated by Compute Engine (not a user). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#automatic_restart ComputeInstance#automatic_restart}- Returns:
this
-
automaticRestart
@Stability(Stable) public ComputeInstanceScheduling.Builder automaticRestart(com.hashicorp.cdktf.IResolvable automaticRestart)
Sets the value ofComputeInstanceScheduling.getAutomaticRestart()- Parameters:
automaticRestart- Specifies if the instance should be restarted if it was terminated by Compute Engine (not a user). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#automatic_restart ComputeInstance#automatic_restart}- Returns:
this
-
instanceTerminationAction
@Stability(Stable) public ComputeInstanceScheduling.Builder instanceTerminationAction(String instanceTerminationAction)
Sets the value ofComputeInstanceScheduling.getInstanceTerminationAction()- Parameters:
instanceTerminationAction- Specifies the action GCE should take when SPOT VM is preempted. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#instance_termination_action ComputeInstance#instance_termination_action}- Returns:
this
-
localSsdRecoveryTimeout
@Stability(Stable) public ComputeInstanceScheduling.Builder localSsdRecoveryTimeout(ComputeInstanceSchedulingLocalSsdRecoveryTimeout localSsdRecoveryTimeout)
Sets the value ofComputeInstanceScheduling.getLocalSsdRecoveryTimeout()- Parameters:
localSsdRecoveryTimeout- local_ssd_recovery_timeout block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#local_ssd_recovery_timeout ComputeInstance#local_ssd_recovery_timeout}- Returns:
this
-
maxRunDuration
@Stability(Stable) public ComputeInstanceScheduling.Builder maxRunDuration(ComputeInstanceSchedulingMaxRunDuration maxRunDuration)
Sets the value ofComputeInstanceScheduling.getMaxRunDuration()- Parameters:
maxRunDuration- max_run_duration block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#max_run_duration ComputeInstance#max_run_duration}- Returns:
this
-
minNodeCpus
@Stability(Stable) public ComputeInstanceScheduling.Builder minNodeCpus(Number minNodeCpus)
Sets the value ofComputeInstanceScheduling.getMinNodeCpus()- Parameters:
minNodeCpus- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#min_node_cpus ComputeInstance#min_node_cpus}.- Returns:
this
-
nodeAffinities
@Stability(Stable) public ComputeInstanceScheduling.Builder nodeAffinities(com.hashicorp.cdktf.IResolvable nodeAffinities)
Sets the value ofComputeInstanceScheduling.getNodeAffinities()- Parameters:
nodeAffinities- node_affinities block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#node_affinities ComputeInstance#node_affinities}- Returns:
this
-
nodeAffinities
@Stability(Stable) public ComputeInstanceScheduling.Builder nodeAffinities(List<? extends ComputeInstanceSchedulingNodeAffinities> nodeAffinities)
Sets the value ofComputeInstanceScheduling.getNodeAffinities()- Parameters:
nodeAffinities- node_affinities block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#node_affinities ComputeInstance#node_affinities}- Returns:
this
-
onHostMaintenance
@Stability(Stable) public ComputeInstanceScheduling.Builder onHostMaintenance(String onHostMaintenance)
Sets the value ofComputeInstanceScheduling.getOnHostMaintenance()- Parameters:
onHostMaintenance- Describes maintenance behavior for the instance. One of MIGRATE or TERMINATE,. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#on_host_maintenance ComputeInstance#on_host_maintenance}- Returns:
this
-
onInstanceStopAction
@Stability(Stable) public ComputeInstanceScheduling.Builder onInstanceStopAction(ComputeInstanceSchedulingOnInstanceStopAction onInstanceStopAction)
Sets the value ofComputeInstanceScheduling.getOnInstanceStopAction()- Parameters:
onInstanceStopAction- on_instance_stop_action block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#on_instance_stop_action ComputeInstance#on_instance_stop_action}- Returns:
this
-
preemptible
@Stability(Stable) public ComputeInstanceScheduling.Builder preemptible(Boolean preemptible)
Sets the value ofComputeInstanceScheduling.getPreemptible()- Parameters:
preemptible- Whether the instance is preemptible. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#preemptible ComputeInstance#preemptible}- Returns:
this
-
preemptible
@Stability(Stable) public ComputeInstanceScheduling.Builder preemptible(com.hashicorp.cdktf.IResolvable preemptible)
Sets the value ofComputeInstanceScheduling.getPreemptible()- Parameters:
preemptible- Whether the instance is preemptible. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#preemptible ComputeInstance#preemptible}- Returns:
this
-
provisioningModel
@Stability(Stable) public ComputeInstanceScheduling.Builder provisioningModel(String provisioningModel)
Sets the value ofComputeInstanceScheduling.getProvisioningModel()- Parameters:
provisioningModel- Whether the instance is spot. If this is set as SPOT. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance#provisioning_model ComputeInstance#provisioning_model}- Returns:
this
-
build
@Stability(Stable) public ComputeInstanceScheduling build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeInstanceScheduling>- Returns:
- a new instance of
ComputeInstanceScheduling - Throws:
NullPointerException- if any required attribute was not provided
-
-