AgentPoolUpgradeSettings Class
- java.
lang. Object - com.
azure. resourcemanager. networkcloud. models. AgentPoolUpgradeSettings
- com.
Implements
public final class AgentPoolUpgradeSettings
implements JsonSerializable<AgentPoolUpgradeSettings>
AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.
Constructor Summary
| Constructor | Description |
|---|---|
| AgentPoolUpgradeSettings() |
Creates an instance of Agent |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Long |
drainTimeout()
Get the drain |
|
static
Agent |
fromJson(JsonReader jsonReader)
Reads an instance of Agent |
| String |
maxSurge()
Get the max |
| String |
maxUnavailable()
Get the max |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Agent |
withDrainTimeout(Long drainTimeout)
Set the drain |
|
Agent |
withMaxSurge(String maxSurge)
Set the max |
|
Agent |
withMaxUnavailable(String maxUnavailable)
Set the max |
Methods inherited from java.lang.Object
Constructor Details
AgentPoolUpgradeSettings
public AgentPoolUpgradeSettings()
Creates an instance of AgentPoolUpgradeSettings class.
Method Details
drainTimeout
public Long drainTimeout()
Get the drainTimeout property: The maximum time in seconds that is allowed for a node drain to complete before proceeding with the upgrade of the agent pool. If not specified during creation, a value of 1800 seconds is used.
Returns:
fromJson
public static AgentPoolUpgradeSettings fromJson(JsonReader jsonReader)
Reads an instance of AgentPoolUpgradeSettings from the JsonReader.
Parameters:
Returns:
Throws:
maxSurge
public String maxSurge()
Get the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 1 is used. One of MaxSurge and MaxUnavailable must be greater than 0.
Returns:
maxUnavailable
public String maxUnavailable()
Get the maxUnavailable property: The maximum number or percentage of nodes that can be unavailable during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 0 is used. One of MaxSurge and MaxUnavailable must be greater than 0.
Returns:
toJson
validate
public void validate()
Validates the instance.
withDrainTimeout
public AgentPoolUpgradeSettings withDrainTimeout(Long drainTimeout)
Set the drainTimeout property: The maximum time in seconds that is allowed for a node drain to complete before proceeding with the upgrade of the agent pool. If not specified during creation, a value of 1800 seconds is used.
Parameters:
Returns:
withMaxSurge
public AgentPoolUpgradeSettings withMaxSurge(String maxSurge)
Set the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 1 is used. One of MaxSurge and MaxUnavailable must be greater than 0.
Parameters:
Returns:
withMaxUnavailable
public AgentPoolUpgradeSettings withMaxUnavailable(String maxUnavailable)
Set the maxUnavailable property: The maximum number or percentage of nodes that can be unavailable during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 0 is used. One of MaxSurge and MaxUnavailable must be greater than 0.
Parameters:
Returns: