AgentPoolData Class

  • java.lang.Object
    • com.azure.resourcemanager.containerservice.models.AgentPoolData

Implements

public class AgentPoolData
implements AgentPool, HasInnerModel<AgentPoolInner>

The client-side data of an agent pool.

Constructor Summary

Modifier Constructor Description
AgentPoolData()

Creates an instance of agent pool data.

protected AgentPoolData(AgentPoolInner innerModel)

Creates an instance of agent pool data.

Method Summary

Modifier and Type Method and Description
List<String> availabilityZones()

Gets the list of availability zones.

int count()

Gets the number of agents (virtual machines) to host docker containers.

AgentPoolInner innerModel()
boolean isAutoScalingEnabled()

Checks whether auto-scaling is enabled.

boolean isFipsEnabled()

Checks whether FIPS-enabled OS is being used for agent pool's machines.

KubeletDiskType kubeletDiskType()

Gets the disk type for the placement.

int maximumNodeSize()

Gets the maximum number of nodes for auto-scaling.

int maximumPodsPerNode()

Gets the maximum number of pods per node.

int minimumNodeSize()

Gets the minimum number of nodes for auto-scaling.

AgentPoolMode mode()

Gets agent pool mode.

String name()
String networkId()

Gets the ID of the virtual network used by each virtual machine in the agent pool.

Map<String,String> nodeLabels()

Gets the map of node labels.

int nodeSize()

Gets the number of agents (VMs) to host docker containers.

List<String> nodeTaints()

Gets the list of node taints.

int osDiskSizeInGB()

Gets OS disk size in GB set for each virtual machine in the agent pool.

OSDiskType osDiskType()

Gets the maximum price of each spot virtual machines in the agent pool.

OSType osType()

Gets OS of each virtual machine in the agent pool.

PowerState powerState()

Gets the power state.

String provisioningState()

Gets the provisioning state of the agent pool.

String subnetName()

Gets the name of the subnet used by each virtual machine in the agent pool.

Map<String,String> tags()

Gets the tags of the agents.

AgentPoolType type()

Gets agent pool type.

ScaleSetEvictionPolicy virtualMachineEvictionPolicy()

Gets the eviction policy of each virtual machines in the agent pool.

Double virtualMachineMaximumPrice()

Gets the maximum price of each spot virtual machines in the agent pool.

ScaleSetPriority virtualMachinePriority()

Gets the priority of each virtual machines in the agent pool.

ContainerServiceVMSizeTypes vmSize()

Gets size of each agent virtual machine in the agent pool.

AgentPoolData withAgentPoolMode(AgentPoolMode agentPoolMode)

Specifies the agent pool mode for the agents.

AgentPoolData withAgentPoolType(AgentPoolType agentPoolType)

Set agent pool type to every virtual machine in the agent pool.

AgentPoolData withAgentPoolTypeName(String agentPoolTypeName)

Set agent pool type by type name.

AgentPoolData withAgentPoolVirtualMachineCount(int count)

Specifies the number of agents (Virtual Machines) to host docker containers.

AgentPoolData withAutoScaling(int minimumNodeSize, int maximumNodeSize)

Enables the auto-scaling with maximum/minimum number of nodes.

AgentPoolData withAvailabilityZones(Integer[] zones)

Specifies the availability zones.

AgentPoolData withFipsEnabled()

Specify to use an FIPS-enabled OS for agent pool machines.

AgentPoolData withKubeletDiskType(KubeletDiskType kubeletDiskType)

The disk type for the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.

AgentPoolData withMaxPodsCount(int podsCount)

Specifies the maximum number of pods that can run on a node.

AgentPoolData withNodeLabels(Map<String,String> nodeLabels)

Specifies the node labels for all nodes.

AgentPoolData withNodeTaints(List<String> nodeTaints)

Specifies the node labels.

AgentPoolData withOSDiskSizeInGB(int osDiskSizeInGB)

Specifies OS disk size in GB to be used for each virtual machine in the agent pool.

AgentPoolData withOSDiskType(OSDiskType osDiskType)

The OS disk type to be used for machines in the agent pool.

AgentPoolData withOSType(OSType osType)

Specifies OS type to be used for each virtual machine in the agent pool.

AgentPoolData withSpotPriorityVirtualMachine()

Specify that virtual machines should be spot priority VMs.

AgentPoolData withSpotPriorityVirtualMachine(ScaleSetEvictionPolicy policy)

Specify that virtual machines should be spot priority VMs.

AgentPoolData withTag(String key, String value)

Adds a tag to the agents.

AgentPoolData withTags(Map<String,String> tags)

Specifies tags for the agents.

AgentPoolData withVirtualMachineMaximumPrice(Double maxPriceInUsDollars)

Sets the maximum price for virtual machine in agent pool.

AgentPoolData withVirtualMachinePriority(ScaleSetPriority priority)

Specifies the priority of the virtual machines.

AgentPoolData withVirtualMachineSize(ContainerServiceVMSizeTypes vmSize)

Specifies the size of the virtual machines to be used as agents.

AgentPoolData withVirtualNetwork(String virtualNetworkId, String subnetName)

Specifies the virtual network to be used for the agents.

Methods inherited from java.lang.Object

Constructor Details

AgentPoolData

public AgentPoolData()

Creates an instance of agent pool data.

AgentPoolData

protected AgentPoolData(AgentPoolInner innerModel)

Creates an instance of agent pool data.

Parameters:

innerModel - the inner model of agent pool.

Method Details

availabilityZones

public List<String> availabilityZones()

Gets the list of availability zones.

count

public int count()

Gets the number of agents (virtual machines) to host docker containers.

innerModel

public AgentPoolInner innerModel()

isAutoScalingEnabled

public boolean isAutoScalingEnabled()

Checks whether auto-scaling is enabled.

isFipsEnabled

public boolean isFipsEnabled()

Checks whether FIPS-enabled OS is being used for agent pool's machines.

kubeletDiskType

public KubeletDiskType kubeletDiskType()

Gets the disk type for the placement.

maximumNodeSize

public int maximumNodeSize()

Gets the maximum number of nodes for auto-scaling.

maximumPodsPerNode

public int maximumPodsPerNode()

Gets the maximum number of pods per node.

minimumNodeSize

public int minimumNodeSize()

Gets the minimum number of nodes for auto-scaling.

mode

public AgentPoolMode mode()

Gets agent pool mode.

name

public String name()

networkId

public String networkId()

Gets the ID of the virtual network used by each virtual machine in the agent pool.

nodeLabels

public Map<String,String> nodeLabels()

Gets the map of node labels.

nodeSize

public int nodeSize()

Gets the number of agents (VMs) to host docker containers.

nodeTaints

public List<String> nodeTaints()

Gets the list of node taints.

osDiskSizeInGB

public int osDiskSizeInGB()

Gets OS disk size in GB set for each virtual machine in the agent pool.

osDiskType

public OSDiskType osDiskType()

Gets the maximum price of each spot virtual machines in the agent pool.

osType

public OSType osType()

Gets OS of each virtual machine in the agent pool.

powerState

public PowerState powerState()

Gets the power state.

provisioningState

public String provisioningState()

Gets the provisioning state of the agent pool.

subnetName

public String subnetName()

Gets the name of the subnet used by each virtual machine in the agent pool.

tags

public Map<String,String> tags()

Gets the tags of the agents.

type

public AgentPoolType type()

Gets agent pool type.

virtualMachineEvictionPolicy

public ScaleSetEvictionPolicy virtualMachineEvictionPolicy()

Gets the eviction policy of each virtual machines in the agent pool.

virtualMachineMaximumPrice

public Double virtualMachineMaximumPrice()

Gets the maximum price of each spot virtual machines in the agent pool.

virtualMachinePriority

public ScaleSetPriority virtualMachinePriority()

Gets the priority of each virtual machines in the agent pool.

vmSize

public ContainerServiceVMSizeTypes vmSize()

Gets size of each agent virtual machine in the agent pool.

withAgentPoolMode

public AgentPoolData withAgentPoolMode(AgentPoolMode agentPoolMode)

Specifies the agent pool mode for the agents.

Parameters:

agentPoolMode - the agent pool mode

Returns:

the AgentPoolData object itself

withAgentPoolType

public AgentPoolData withAgentPoolType(AgentPoolType agentPoolType)

Set agent pool type to every virtual machine in the agent pool.

Parameters:

agentPoolType - the agent pool type for every machine in the agent pool

Returns:

the AgentPoolData object itself

withAgentPoolTypeName

public AgentPoolData withAgentPoolTypeName(String agentPoolTypeName)

Set agent pool type by type name.

Parameters:

agentPoolTypeName - the agent pool type name in string format

Returns:

the AgentPoolData object itself

withAgentPoolVirtualMachineCount

public AgentPoolData withAgentPoolVirtualMachineCount(int count)

Specifies the number of agents (Virtual Machines) to host docker containers.

Parameters:

count - the number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive); the default value is 1.

Returns:

the AgentPoolData object itself

withAutoScaling

public AgentPoolData withAutoScaling(int minimumNodeSize, int maximumNodeSize)

Enables the auto-scaling with maximum/minimum number of nodes.

Parameters:

minimumNodeSize - the minimum number of nodes for auto-scaling.
maximumNodeSize - the maximum number of nodes for auto-scaling.

Returns:

the AgentPoolData object itself

withAvailabilityZones

public AgentPoolData withAvailabilityZones(Integer[] zones)

Specifies the availability zones.

Parameters:

zones - the availability zones, can be 1, 2, 3.

Returns:

the AgentPoolData object itself

withFipsEnabled

public AgentPoolData withFipsEnabled()

Specify to use an FIPS-enabled OS for agent pool machines.

Returns:

the AgentPoolData object itself

withKubeletDiskType

public AgentPoolData withKubeletDiskType(KubeletDiskType kubeletDiskType)

The disk type for the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.

Parameters:

kubeletDiskType - the disk type for the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.

Returns:

the AgentPoolData object itself

withMaxPodsCount

public AgentPoolData withMaxPodsCount(int podsCount)

Specifies the maximum number of pods that can run on a node.

Parameters:

podsCount - the maximum number of pods that can run on a node

Returns:

the AgentPoolData object itself

withNodeLabels

public AgentPoolData withNodeLabels(Map<String,String> nodeLabels)

Specifies the node labels for all nodes.

Parameters:

nodeLabels - the node labels.

Returns:

the AgentPoolData object itself

withNodeTaints

public AgentPoolData withNodeTaints(List<String> nodeTaints)

Specifies the node labels.

Parameters:

nodeTaints - the node taints for new nodes.

Returns:

the AgentPoolData object itself

withOSDiskSizeInGB

public AgentPoolData withOSDiskSizeInGB(int osDiskSizeInGB)

Specifies OS disk size in GB to be used for each virtual machine in the agent pool.

Parameters:

osDiskSizeInGB - OS Disk Size in GB to be used for every machine in the agent pool

Returns:

the AgentPoolData object itself

withOSDiskType

public AgentPoolData withOSDiskType(OSDiskType osDiskType)

The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'.

Parameters:

osDiskType - the OS disk type to be used for machines in the agent pool

Returns:

the AgentPoolData object itself

withOSType

public AgentPoolData withOSType(OSType osType)

Specifies OS type to be used for each virtual machine in the agent pool.

Parameters:

osType - OS type to be used for each virtual machine in the agent pool

Returns:

the AgentPoolData object itself

withSpotPriorityVirtualMachine

public AgentPoolData withSpotPriorityVirtualMachine()

Specify that virtual machines should be spot priority VMs.

Returns:

the AgentPoolData object itself

withSpotPriorityVirtualMachine

public AgentPoolData withSpotPriorityVirtualMachine(ScaleSetEvictionPolicy policy)

Specify that virtual machines should be spot priority VMs.

Parameters:

policy - eviction policy for the virtual machines.

Returns:

the AgentPoolData object itself

withTag

public AgentPoolData withTag(String key, String value)

Adds a tag to the agents.

Parameters:

key - the key for the tag
value - the value for the tag

Returns:

the AgentPoolData object itself

withTags

public AgentPoolData withTags(Map<String,String> tags)

Specifies tags for the agents.

Parameters:

tags - the tags to associate

Returns:

the AgentPoolData object itself

withVirtualMachineMaximumPrice

public AgentPoolData withVirtualMachineMaximumPrice(Double maxPriceInUsDollars)

Sets the maximum price for virtual machine in agent pool. This price is in US Dollars. Default is -1 if not specified, as up to pay-as-you-go prices.

Parameters:

maxPriceInUsDollars - the maximum price in US Dollars

Returns:

the AgentPoolData object itself

withVirtualMachinePriority

public AgentPoolData withVirtualMachinePriority(ScaleSetPriority priority)

Specifies the priority of the virtual machines.

Parameters:

priority - the priority

Returns:

the AgentPoolData object itself

withVirtualMachineSize

public AgentPoolData withVirtualMachineSize(ContainerServiceVMSizeTypes vmSize)

Specifies the size of the virtual machines to be used as agents.

Parameters:

vmSize - the size of each virtual machine in the agent pool

Returns:

the AgentPoolData object itself

withVirtualNetwork

public AgentPoolData withVirtualNetwork(String virtualNetworkId, String subnetName)

Specifies the virtual network to be used for the agents.

Parameters:

virtualNetworkId - the ID of a virtual network
subnetName - the name of the subnet within the virtual network.; the subnet must have the service endpoints enabled for 'Microsoft.ContainerService'.

Returns:

the AgentPoolData object itself

Applies to