Class ComputeInstanceFromTemplateScheduling.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_instance_from_template.ComputeInstanceFromTemplateScheduling.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeInstanceFromTemplateScheduling>
- Enclosing interface:
- ComputeInstanceFromTemplateScheduling
@Stability(Stable) public static final class ComputeInstanceFromTemplateScheduling.Builder extends Object implements software.amazon.jsii.Builder<ComputeInstanceFromTemplateScheduling>
A builder forComputeInstanceFromTemplateScheduling
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
automaticRestart
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder automaticRestart(Boolean automaticRestart)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#automatic_restart ComputeInstanceFromTemplate#automatic_restart}- Returns:
this
-
automaticRestart
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder automaticRestart(com.hashicorp.cdktf.IResolvable automaticRestart)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#automatic_restart ComputeInstanceFromTemplate#automatic_restart}- Returns:
this
-
instanceTerminationAction
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder instanceTerminationAction(String instanceTerminationAction)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#instance_termination_action ComputeInstanceFromTemplate#instance_termination_action}- Returns:
this
-
localSsdRecoveryTimeout
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder localSsdRecoveryTimeout(ComputeInstanceFromTemplateSchedulingLocalSsdRecoveryTimeout localSsdRecoveryTimeout)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#local_ssd_recovery_timeout ComputeInstanceFromTemplate#local_ssd_recovery_timeout}- Returns:
this
-
maxRunDuration
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder maxRunDuration(ComputeInstanceFromTemplateSchedulingMaxRunDuration maxRunDuration)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#max_run_duration ComputeInstanceFromTemplate#max_run_duration}- Returns:
this
-
minNodeCpus
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder minNodeCpus(Number minNodeCpus)
Sets the value ofComputeInstanceFromTemplateScheduling.getMinNodeCpus()- Parameters:
minNodeCpus- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_from_template#min_node_cpus ComputeInstanceFromTemplate#min_node_cpus}.- Returns:
this
-
nodeAffinities
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder nodeAffinities(com.hashicorp.cdktf.IResolvable nodeAffinities)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#node_affinities ComputeInstanceFromTemplate#node_affinities}- Returns:
this
-
nodeAffinities
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder nodeAffinities(List<? extends ComputeInstanceFromTemplateSchedulingNodeAffinities> nodeAffinities)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#node_affinities ComputeInstanceFromTemplate#node_affinities}- Returns:
this
-
onHostMaintenance
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder onHostMaintenance(String onHostMaintenance)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#on_host_maintenance ComputeInstanceFromTemplate#on_host_maintenance}- Returns:
this
-
onInstanceStopAction
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder onInstanceStopAction(ComputeInstanceFromTemplateSchedulingOnInstanceStopAction onInstanceStopAction)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#on_instance_stop_action ComputeInstanceFromTemplate#on_instance_stop_action}- Returns:
this
-
preemptible
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder preemptible(Boolean preemptible)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#preemptible ComputeInstanceFromTemplate#preemptible}- Returns:
this
-
preemptible
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder preemptible(com.hashicorp.cdktf.IResolvable preemptible)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#preemptible ComputeInstanceFromTemplate#preemptible}- Returns:
this
-
provisioningModel
@Stability(Stable) public ComputeInstanceFromTemplateScheduling.Builder provisioningModel(String provisioningModel)
Sets the value ofComputeInstanceFromTemplateScheduling.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_from_template#provisioning_model ComputeInstanceFromTemplate#provisioning_model}- Returns:
this
-
build
@Stability(Stable) public ComputeInstanceFromTemplateScheduling build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeInstanceFromTemplateScheduling>- Returns:
- a new instance of
ComputeInstanceFromTemplateScheduling - Throws:
NullPointerException- if any required attribute was not provided
-
-