Class ComputeInstanceTemplateScheduling.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_instance_template.ComputeInstanceTemplateScheduling.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeInstanceTemplateScheduling>
- Enclosing interface:
- ComputeInstanceTemplateScheduling
@Stability(Stable) public static final class ComputeInstanceTemplateScheduling.Builder extends Object implements software.amazon.jsii.Builder<ComputeInstanceTemplateScheduling>
A builder forComputeInstanceTemplateScheduling
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
automaticRestart
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder automaticRestart(Boolean automaticRestart)
Sets the value ofComputeInstanceTemplateScheduling.getAutomaticRestart()- Parameters:
automaticRestart- Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#automatic_restart ComputeInstanceTemplate#automatic_restart}- Returns:
this
-
automaticRestart
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder automaticRestart(com.hashicorp.cdktf.IResolvable automaticRestart)
Sets the value ofComputeInstanceTemplateScheduling.getAutomaticRestart()- Parameters:
automaticRestart- Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#automatic_restart ComputeInstanceTemplate#automatic_restart}- Returns:
this
-
instanceTerminationAction
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder instanceTerminationAction(String instanceTerminationAction)
Sets the value ofComputeInstanceTemplateScheduling.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_template#instance_termination_action ComputeInstanceTemplate#instance_termination_action}- Returns:
this
-
localSsdRecoveryTimeout
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder localSsdRecoveryTimeout(com.hashicorp.cdktf.IResolvable localSsdRecoveryTimeout)
Sets the value ofComputeInstanceTemplateScheduling.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_template#local_ssd_recovery_timeout ComputeInstanceTemplate#local_ssd_recovery_timeout}- Returns:
this
-
localSsdRecoveryTimeout
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder localSsdRecoveryTimeout(List<? extends ComputeInstanceTemplateSchedulingLocalSsdRecoveryTimeout> localSsdRecoveryTimeout)
Sets the value ofComputeInstanceTemplateScheduling.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_template#local_ssd_recovery_timeout ComputeInstanceTemplate#local_ssd_recovery_timeout}- Returns:
this
-
maxRunDuration
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder maxRunDuration(ComputeInstanceTemplateSchedulingMaxRunDuration maxRunDuration)
Sets the value ofComputeInstanceTemplateScheduling.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_template#max_run_duration ComputeInstanceTemplate#max_run_duration}- Returns:
this
-
minNodeCpus
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder minNodeCpus(Number minNodeCpus)
Sets the value ofComputeInstanceTemplateScheduling.getMinNodeCpus()- Parameters:
minNodeCpus- Minimum number of cpus for the instance. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#min_node_cpus ComputeInstanceTemplate#min_node_cpus}- Returns:
this
-
nodeAffinities
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder nodeAffinities(com.hashicorp.cdktf.IResolvable nodeAffinities)
Sets the value ofComputeInstanceTemplateScheduling.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_template#node_affinities ComputeInstanceTemplate#node_affinities}- Returns:
this
-
nodeAffinities
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder nodeAffinities(List<? extends ComputeInstanceTemplateSchedulingNodeAffinities> nodeAffinities)
Sets the value ofComputeInstanceTemplateScheduling.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_template#node_affinities ComputeInstanceTemplate#node_affinities}- Returns:
this
-
onHostMaintenance
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder onHostMaintenance(String onHostMaintenance)
Sets the value ofComputeInstanceTemplateScheduling.getOnHostMaintenance()- Parameters:
onHostMaintenance- Defines the maintenance behavior for this instance. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#on_host_maintenance ComputeInstanceTemplate#on_host_maintenance}- Returns:
this
-
onInstanceStopAction
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder onInstanceStopAction(ComputeInstanceTemplateSchedulingOnInstanceStopAction onInstanceStopAction)
Sets the value ofComputeInstanceTemplateScheduling.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_template#on_instance_stop_action ComputeInstanceTemplate#on_instance_stop_action}- Returns:
this
-
preemptible
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder preemptible(Boolean preemptible)
Sets the value ofComputeInstanceTemplateScheduling.getPreemptible()- Parameters:
preemptible- Allows instance to be preempted. This defaults to false. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#preemptible ComputeInstanceTemplate#preemptible}- Returns:
this
-
preemptible
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder preemptible(com.hashicorp.cdktf.IResolvable preemptible)
Sets the value ofComputeInstanceTemplateScheduling.getPreemptible()- Parameters:
preemptible- Allows instance to be preempted. This defaults to false. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#preemptible ComputeInstanceTemplate#preemptible}- Returns:
this
-
provisioningModel
@Stability(Stable) public ComputeInstanceTemplateScheduling.Builder provisioningModel(String provisioningModel)
Sets the value ofComputeInstanceTemplateScheduling.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_template#provisioning_model ComputeInstanceTemplate#provisioning_model}- Returns:
this
-
build
@Stability(Stable) public ComputeInstanceTemplateScheduling build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeInstanceTemplateScheduling>- Returns:
- a new instance of
ComputeInstanceTemplateScheduling - Throws:
NullPointerException- if any required attribute was not provided
-
-