Class InstanceInfo.Builder (6.55.0)

public abstract static class InstanceInfo.Builder

Builder for InstanceInfo.

Inheritance

java.lang.Object > InstanceInfo.Builder

Constructors

Builder()

public Builder()

Methods

addLabel(String key, String value)

public abstract InstanceInfo.Builder addLabel(String key, String value)
Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
InstanceInfo.Builder

build()

public abstract InstanceInfo build()
Returns
TypeDescription
InstanceInfo

putAllLabels(Map<String,String> labels)

public abstract InstanceInfo.Builder putAllLabels(Map<String,String> labels)
Parameter
NameDescription
labelsMap<String,String>
Returns
TypeDescription
InstanceInfo.Builder

setAutoscalingConfig(AutoscalingConfig autoscalingConfig)

public InstanceInfo.Builder setAutoscalingConfig(AutoscalingConfig autoscalingConfig)

Sets the autoscaling config for the instance, which will enable the autoscaling for this instance. Exactly one of processing units, node count, or autoscaling config must be set when creating a new instance.

Parameter
NameDescription
autoscalingConfigAutoscalingConfig
Returns
TypeDescription
InstanceInfo.Builder

setDisplayName(String displayName)

public abstract InstanceInfo.Builder setDisplayName(String displayName)
Parameter
NameDescription
displayNameString
Returns
TypeDescription
InstanceInfo.Builder

setInstanceConfigId(InstanceConfigId configId)

public abstract InstanceInfo.Builder setInstanceConfigId(InstanceConfigId configId)
Parameter
NameDescription
configIdInstanceConfigId
Returns
TypeDescription
InstanceInfo.Builder

setNodeCount(int nodeCount)

public abstract InstanceInfo.Builder setNodeCount(int nodeCount)

Sets the number of nodes for the instance. Exactly one of processing units, node count or autoscaling config must be set when creating a new instance.

Parameter
NameDescription
nodeCountint
Returns
TypeDescription
InstanceInfo.Builder

setProcessingUnits(int processingUnits)

public InstanceInfo.Builder setProcessingUnits(int processingUnits)

Sets the number of processing units for the instance. Exactly one of processing units, node count, or autoscaling config must be set when creating a new instance. Processing units must be between 1 and 999 (inclusive) when creating a new instance with node count = 0. Processing units from 1000 and up must always be a multiple of 1000 (that is equal to an integer number of nodes).

Parameter
NameDescription
processingUnitsint
Returns
TypeDescription
InstanceInfo.Builder

setState(InstanceInfo.State state)

public abstract InstanceInfo.Builder setState(InstanceInfo.State state)
Parameter
NameDescription
stateInstanceInfo.State
Returns
TypeDescription
InstanceInfo.Builder