java.lang.Object
com.azure.resourcemanager.containerservice.models.AgentPoolData
All Implemented Interfaces:
AgentPool, HasName, HasInnerModel<AgentPoolInner>

public class AgentPoolData extends Object implements AgentPool, HasInnerModel<AgentPoolInner>
The client-side data of an agent pool.
  • 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

    • name

      public String name()
      Specified by:
      name in interface HasName
    • provisioningState

      public String provisioningState()
      Specified by:
      provisioningState in interface AgentPool
      Returns:
      the provisioning state of the agent pool
    • count

      public int count()
      Specified by:
      count in interface AgentPool
      Returns:
      the number of agents (virtual machines) to host docker containers
    • vmSize

      public ContainerServiceVMSizeTypes vmSize()
      Specified by:
      vmSize in interface AgentPool
      Returns:
      size of each agent virtual machine in the agent pool
    • osDiskSizeInGB

      public int osDiskSizeInGB()
      Specified by:
      osDiskSizeInGB in interface AgentPool
      Returns:
      OS disk size in GB set for each virtual machine in the agent pool
    • osType

      public OSType osType()
      Specified by:
      osType in interface AgentPool
      Returns:
      OS of each virtual machine in the agent pool
    • type

      public AgentPoolType type()
      Specified by:
      type in interface AgentPool
      Returns:
      agent pool type
    • mode

      public AgentPoolMode mode()
      Specified by:
      mode in interface AgentPool
      Returns:
      agent pool mode
    • subnetName

      public String subnetName()
      Specified by:
      subnetName in interface AgentPool
      Returns:
      the name of the subnet used by each virtual machine in the agent pool
    • networkId

      public String networkId()
      Specified by:
      networkId in interface AgentPool
      Returns:
      the ID of the virtual network used by each virtual machine in the agent pool
    • availabilityZones

      public List<String> availabilityZones()
      Specified by:
      availabilityZones in interface AgentPool
      Returns:
      the list of availability zones
    • nodeLabels

      public Map<String,String> nodeLabels()
      Specified by:
      nodeLabels in interface AgentPool
      Returns:
      the map of node labels
    • nodeTaints

      public List<String> nodeTaints()
      Specified by:
      nodeTaints in interface AgentPool
      Returns:
      the list of node taints
    • powerState

      public PowerState powerState()
      Specified by:
      powerState in interface AgentPool
      Returns:
      the power state, Running or Stopped
    • nodeSize

      public int nodeSize()
      Specified by:
      nodeSize in interface AgentPool
      Returns:
      the number of agents (VMs) to host docker containers
    • maximumPodsPerNode

      public int maximumPodsPerNode()
      Specified by:
      maximumPodsPerNode in interface AgentPool
      Returns:
      the maximum number of pods per node
    • isAutoScalingEnabled

      public boolean isAutoScalingEnabled()
      Specified by:
      isAutoScalingEnabled in interface AgentPool
      Returns:
      whether auto-scaling is enabled
    • minimumNodeSize

      public int minimumNodeSize()
      Specified by:
      minimumNodeSize in interface AgentPool
      Returns:
      the minimum number of nodes for auto-scaling
    • maximumNodeSize

      public int maximumNodeSize()
      Specified by:
      maximumNodeSize in interface AgentPool
      Returns:
      the maximum number of nodes for auto-scaling
    • virtualMachinePriority

      public ScaleSetPriority virtualMachinePriority()
      Specified by:
      virtualMachinePriority in interface AgentPool
      Returns:
      the priority of each virtual machines in the agent pool
    • virtualMachineEvictionPolicy

      public ScaleSetEvictionPolicy virtualMachineEvictionPolicy()
      Specified by:
      virtualMachineEvictionPolicy in interface AgentPool
      Returns:
      the eviction policy of each virtual machines in the agent pool
    • virtualMachineMaximumPrice

      public Double virtualMachineMaximumPrice()
      Specified by:
      virtualMachineMaximumPrice in interface AgentPool
      Returns:
      the maximum price of each spot virtual machines in the agent pool, -1 means pay-as-you-go prices
    • osDiskType

      public OSDiskType osDiskType()
      Specified by:
      osDiskType in interface AgentPool
      Returns:
      the OS disk type to be used for machines in the agent pool
    • kubeletDiskType

      public KubeletDiskType kubeletDiskType()
      Specified by:
      kubeletDiskType in interface AgentPool
      Returns:
      the disk type for the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage
    • isFipsEnabled

      public boolean isFipsEnabled()
      Specified by:
      isFipsEnabled in interface AgentPool
      Returns:
      whether FIPS-enabled OS is been used for agent pool's machines
      See Also:
    • tags

      public Map<String,String> tags()
      Specified by:
      tags in interface AgentPool
      Returns:
      the tags of the agents.
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • withVirtualMachinePriority

      public AgentPoolData withVirtualMachinePriority(ScaleSetPriority priority)
      Specifies the priority of the virtual machines.
      Parameters:
      priority - the priority
      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
    • 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
    • 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
    • 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
    • withTags

      public AgentPoolData withTags(Map<String,String> tags)
      Specifies tags for the agents.
      Parameters:
      tags - the tags to associate
      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
    • withFipsEnabled

      public AgentPoolData withFipsEnabled()
      Specify to use an FIPS-enabled OS for agent pool machines.
      Returns:
      the AgentPoolData object itself
      See Also:
    • innerModel

      public AgentPoolInner innerModel()
      Specified by:
      innerModel in interface HasInnerModel<AgentPoolInner>