你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AgentPoolUpgradeSettings Class

  • java.lang.Object
    • com.azure.resourcemanager.networkcloud.models.AgentPoolUpgradeSettings

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 AgentPoolUpgradeSettings class.

Method Summary

Modifier and Type Method and Description
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.

static AgentPoolUpgradeSettings fromJson(JsonReader jsonReader)

Reads an instance of AgentPoolUpgradeSettings from the JsonReader.

String maxSurge()

Get the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade.

String maxUnavailable()

Get the maxUnavailable property: The maximum number or percentage of nodes that can be unavailable during upgrade.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

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.

AgentPoolUpgradeSettings withMaxSurge(String maxSurge)

Set the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade.

AgentPoolUpgradeSettings withMaxUnavailable(String maxUnavailable)

Set the maxUnavailable property: The maximum number or percentage of nodes that can be unavailable during upgrade.

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:

the drainTimeout value.

fromJson

public static AgentPoolUpgradeSettings fromJson(JsonReader jsonReader)

Reads an instance of AgentPoolUpgradeSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AgentPoolUpgradeSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the AgentPoolUpgradeSettings.

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:

the maxSurge value.

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:

the maxUnavailable value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

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:

drainTimeout - the drainTimeout value to set.

Returns:

the AgentPoolUpgradeSettings object itself.

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:

maxSurge - the maxSurge value to set.

Returns:

the AgentPoolUpgradeSettings object itself.

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:

maxUnavailable - the maxUnavailable value to set.

Returns:

the AgentPoolUpgradeSettings object itself.

Applies to