Class TpuNodeConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.tpu_node.TpuNodeConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TpuNodeConfig>
- Enclosing interface:
- TpuNodeConfig
@Stability(Stable) public static final class TpuNodeConfig.Builder extends Object implements software.amazon.jsii.Builder<TpuNodeConfig>
A builder forTpuNodeConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TpuNodeConfig.BuilderacceleratorType(String acceleratorType)Sets the value ofTpuNodeConfig.getAcceleratorType()TpuNodeConfigbuild()Builds the configured instance.TpuNodeConfig.BuildercidrBlock(String cidrBlock)Sets the value ofTpuNodeConfig.getCidrBlock()TpuNodeConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()TpuNodeConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()TpuNodeConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()TpuNodeConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()TpuNodeConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()TpuNodeConfig.Builderdescription(String description)Sets the value ofTpuNodeConfig.getDescription()TpuNodeConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()TpuNodeConfig.Builderid(String id)Sets the value ofTpuNodeConfig.getId()TpuNodeConfig.Builderlabels(Map<String,String> labels)Sets the value ofTpuNodeConfig.getLabels()TpuNodeConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()TpuNodeConfig.Buildername(String name)Sets the value ofTpuNodeConfig.getName()TpuNodeConfig.Buildernetwork(String network)Sets the value ofTpuNodeConfig.getNetwork()TpuNodeConfig.Builderproject(String project)Sets the value ofTpuNodeConfig.getProject()TpuNodeConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()TpuNodeConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()TpuNodeConfig.BuilderschedulingConfig(TpuNodeSchedulingConfig schedulingConfig)Sets the value ofTpuNodeConfig.getSchedulingConfig()TpuNodeConfig.BuildertensorflowVersion(String tensorflowVersion)Sets the value ofTpuNodeConfig.getTensorflowVersion()TpuNodeConfig.Buildertimeouts(TpuNodeTimeouts timeouts)Sets the value ofTpuNodeConfig.getTimeouts()TpuNodeConfig.BuilderuseServiceNetworking(com.hashicorp.cdktf.IResolvable useServiceNetworking)Sets the value ofTpuNodeConfig.getUseServiceNetworking()TpuNodeConfig.BuilderuseServiceNetworking(Boolean useServiceNetworking)Sets the value ofTpuNodeConfig.getUseServiceNetworking()TpuNodeConfig.Builderzone(String zone)Sets the value ofTpuNodeConfig.getZone()
-
-
-
Method Detail
-
acceleratorType
@Stability(Stable) public TpuNodeConfig.Builder acceleratorType(String acceleratorType)
Sets the value ofTpuNodeConfig.getAcceleratorType()- Parameters:
acceleratorType- The type of hardware accelerators associated with this node. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#accelerator_type TpuNode#accelerator_type}- Returns:
this
-
name
@Stability(Stable) public TpuNodeConfig.Builder name(String name)
Sets the value ofTpuNodeConfig.getName()- Parameters:
name- The immutable name of the TPU. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#name TpuNode#name}- Returns:
this
-
tensorflowVersion
@Stability(Stable) public TpuNodeConfig.Builder tensorflowVersion(String tensorflowVersion)
Sets the value ofTpuNodeConfig.getTensorflowVersion()- Parameters:
tensorflowVersion- The version of Tensorflow running in the Node. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#tensorflow_version TpuNode#tensorflow_version}- Returns:
this
-
cidrBlock
@Stability(Stable) public TpuNodeConfig.Builder cidrBlock(String cidrBlock)
Sets the value ofTpuNodeConfig.getCidrBlock()- Parameters:
cidrBlock- The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#cidr_block TpuNode#cidr_block}- Returns:
this
-
description
@Stability(Stable) public TpuNodeConfig.Builder description(String description)
Sets the value ofTpuNodeConfig.getDescription()- Parameters:
description- The user-supplied description of the TPU. Maximum of 512 characters. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#description TpuNode#description}- Returns:
this
-
id
@Stability(Stable) public TpuNodeConfig.Builder id(String id)
Sets the value ofTpuNodeConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#id TpuNode#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
labels
@Stability(Stable) public TpuNodeConfig.Builder labels(Map<String,String> labels)
Sets the value ofTpuNodeConfig.getLabels()- Parameters:
labels- Resource labels to represent user provided metadata. **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#labels TpuNode#labels}- Returns:
this
-
network
@Stability(Stable) public TpuNodeConfig.Builder network(String network)
Sets the value ofTpuNodeConfig.getNetwork()- Parameters:
network- The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#network TpuNode#network}- Returns:
this
-
project
@Stability(Stable) public TpuNodeConfig.Builder project(String project)
Sets the value ofTpuNodeConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#project TpuNode#project}.- Returns:
this
-
schedulingConfig
@Stability(Stable) public TpuNodeConfig.Builder schedulingConfig(TpuNodeSchedulingConfig schedulingConfig)
Sets the value ofTpuNodeConfig.getSchedulingConfig()- Parameters:
schedulingConfig- scheduling_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#scheduling_config TpuNode#scheduling_config}- Returns:
this
-
timeouts
@Stability(Stable) public TpuNodeConfig.Builder timeouts(TpuNodeTimeouts timeouts)
Sets the value ofTpuNodeConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#timeouts TpuNode#timeouts}- Returns:
this
-
useServiceNetworking
@Stability(Stable) public TpuNodeConfig.Builder useServiceNetworking(Boolean useServiceNetworking)
Sets the value ofTpuNodeConfig.getUseServiceNetworking()- Parameters:
useServiceNetworking- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#use_service_networking TpuNode#use_service_networking}- Returns:
this
-
useServiceNetworking
@Stability(Stable) public TpuNodeConfig.Builder useServiceNetworking(com.hashicorp.cdktf.IResolvable useServiceNetworking)
Sets the value ofTpuNodeConfig.getUseServiceNetworking()- Parameters:
useServiceNetworking- Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#use_service_networking TpuNode#use_service_networking}- Returns:
this
-
zone
@Stability(Stable) public TpuNodeConfig.Builder zone(String zone)
Sets the value ofTpuNodeConfig.getZone()- Parameters:
zone- The GCP location for the TPU. If it is not provided, the provider zone is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/tpu_node#zone TpuNode#zone}- Returns:
this
-
connection
@Stability(Experimental) public TpuNodeConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public TpuNodeConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public TpuNodeConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public TpuNodeConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public TpuNodeConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public TpuNodeConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public TpuNodeConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public TpuNodeConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public TpuNodeConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public TpuNodeConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TpuNodeConfig>- Returns:
- a new instance of
TpuNodeConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-