code: public AgentPoolInner beginCreateOrUpdate(String resourceGroupName, String managedClusterName, String agentPoolName, AgentPoolInner parameters) {
          return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, managedClusterName, agentPoolName, parameters).toBlocking().single().body();
      }
docs: Creates or updates an agent pool.
  Creates or updates an agent pool in the specified managed cluster.
  
  @param resourceGroupName The name of the resource group.
  @param managedClusterName The name of the managed cluster resource.
  @param agentPoolName The name of the agent pool.
  @param parameters Parameters supplied to the Create or Update an agent pool operation.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws CloudException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the AgentPoolInner object if successful.